Master Language Inherits System Web Mvc ViewMasterPage DOCTYPE html PU

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
function CheckInputValue() {
var searchString = document.getElementById("Text").value;
if (searchString == null || searchString == "") {
return false;
}
else {
return true;
}
}
</script>
</head>
<body>
<div class="page">
<div id="header">
<div id="title">
<h1>My MVC Application</h1>
</div>
<div id="logindisplay">
<% Html.RenderPartial("LogOnUserControl"); %>
</div>
<div id="menucontainer">
<ul id="menu">
<li><%= Html.ActionLink("Home", "Index", "Home")%></li>
<li><%= Html.ActionLink("About", "About", "Home")%></li>
<li><%= Html.ActionLink("Search", "Index", "Task")%></li>
<% if (HttpContext.Current.User.Identity.IsAuthenticated)
{ %>
<li><%= Html.ActionLink("Tasks", "List", "Task")%></li>
<% } %>
</ul>
<ul id="searchMenu">
<% using (Html.BeginForm("SearchBySomeText", "Task", FormMethod.Get))
{%>
<%-- <% using (Ajax.BeginForm("SearchBySomeText", "Task", new AjaxOptions { UpdateTargetId = "main", HttpMethod = "get" }))
{ %>--%>
<label for="Name"> Text to find : </label>
<%= Html.TextBox("Text")%>
<%--, ViewData["Text"], new {text="", id="txtSearch" })%>--%>
<input type="submit" id="btnSearch" value="Search" onclick="return CheckInputValue()" /><br />
<%} %>
</ul>
</div>
</div>
<div id="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
<div id="footer">
</div>
</div>
</div>
</body>
</html>