|
<%@ 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" />
</head>
<body>
<div class="page">
<div id="header">
<div id="title">
<h1>
yaBlogEngineMVC</h1>
</div>
<div id="logindisplay">
<% Html.RenderPartial("LogOnUserControl"); %>
</div>
<div id="menucontainer">
<ul id="menu">
<li>
<%: Html.ActionLink("Home", "Index", "Blog")%></li>
<%if (Request.IsAuthenticated)
{
if (HttpContext.Current.User.IsInRole("Authors"))
{%>
<li> <%: Html.ActionLink("Post New Blog", "Create", "Blog")%></li>
<li> <%: Html.ActionLink("Manage Blogs", "List", "Blog")%></li>
<li> <%: Html.ActionLink("Manage Categories", "Index", "Category")%></li>
<%}
} %>
</ul>
</div>
</div>
<div id="main">
<table width="100%">
<tr>
<td>
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</td>
<td width="200px" valign="top">
<h4>Categories</h4>
<%: Html.ActionLink("ALL", "Index", "Blog", new { catagoryId = 0, id = Request.QueryString["id"] }, "")%>
<br />
<% foreach (YaBlogEngineMVC.Models.ViewModels.CategoryListViewModel c in (ViewData["Categories"] as IEnumerable<YaBlogEngineMVC.Models.ViewModels.CategoryListViewModel>))
{ %>
<%: Html.ActionLink(string.Format("{0} ({1})", c.Category.CategoryName, c.BlogCount), "Index", "Blog", new { catagoryId = c.Category.ID , id = Request.QueryString["id"]} , "")%>
<br />
<%} %>
</td>
</tr>
</table>
<div id="footer">
</div>
</div>
</div>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I Started my Programming career with C++. Later got a chance to develop Windows Form applications using C#. Currently using C#, ASP.NET & ASP.NET MVC to create Information Systems, e-commerce/e-governance Portals and Data driven websites.
My interests involves Programming, Website development and Learning/Teaching subjects related to Computer Science/Information Systems. IMO, C# is the best programming language and I love working with C# and other Microsoft Technologies.
- Microsoft Certified Technology Specialist (MCTS): Web Applications Development with Microsoft .NET Framework 4
- Microsoft Certified Technology Specialist (MCTS): Accessing Data with Microsoft .NET Framework 4
- Microsoft Certified Technology Specialist (MCTS): Windows Communication Foundation Development with Microsoft .NET Framework 4
If you like my articles, please visit my website for more: www.rahulrajatsingh.com[^]