用框架网页,和mvc不mvc无关。google frameset
解决方案 »
- asp.net web发布服务器问题
- gridview 绑定问题
- 100分问一个简单的问题
- 最后10分!我的网站无法访问!
- 我有编程基础,看过C、数据结构、Windows程序设计、Windows核心编程,但没学过C#、没作过Web应用,现在想学ASP.Net,该怎么办?
- aspx网页无法显示~~~
- 急急急急急急急急急!
- 急:为什么freetextbox的Undo和Redo不能作用,没有效果?在线等
- 高分求助:在框架中页面跳转问题(跟以前帖子不同!!!)
- 请教同仁:如何将已建立的数据库(SQL Server)移植到另一机上。
- subsonic2.2连接mysql数据库报错
- SimpleMembership 中如何锁定(禁用)账户
这个是母版页这个是左边的菜单这个是上边的菜单
@Html.Partial("~/Views/Shared/_TopMenu.cshtml")
@Html.Partial("~/Views/Shared/_LeftMenu.cshtml")
这两个是分别在Shared控制器里嵌套的两个视图,上左菜单
然后你自己新建视图引用母版页,新建视图上面的html代码就会出现在@RenderBody()的位置
第一步新建 MasterPage. master 母版页<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<!--左边菜单栏开始-->
<td class="style1" valign="top">
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XmlDataSource1"
ImageSet="Faq">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="Purple" />
<SelectedNodeStyle Font-Underline="True" HorizontalPadding="0px"
VerticalPadding="0px" />
<DataBindings>
<asp:TreeNodeBinding DataMember="siteMapNode" NavigateUrlField="url"
TextField="title" />
<asp:TreeNodeBinding DataMember="siteMapNode" NavigateUrlField="url"
TextField="title" />
<asp:TreeNodeBinding DataMember="siteMapNode" NavigateUrlField="url"
TextField="title" />
</DataBindings>
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="DarkBlue"
HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" />
</asp:TreeView>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml">
</asp:XmlDataSource>
</td>
<!--右边主要内容开始-->
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<asp:ContentPlaceHolder ID="cphContent" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!--网站底部开始-->
<div align="center">
<div style="text-align: left; background-color: #8ed055; font-size: 10pt;width: 100%;height:9px;"> </div>
<br>
<a href="#" class="bottom">公司简介</a> <a href="#" class="bottom">诚征英才</a>
<a href="#" class="bottom">网站联盟</a> <a href="#" class="bottom">店中店招商</a>
<a href="#" class="bottom">交易条款</a>
</div>
第二步 写个 ~/XMLFile.xml 文件
<?xml version="1.0" encoding="utf-8" ?>
<!--<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >-->
<siteMapNode url="" title="武汉医舟" description="">
<siteMapNode url="" title="首页" description="">
<siteMapNode url="News.aspx" title="行业新闻" description=""/>
<siteMapNode url="Law.aspx" title="在线法规" description=""/>
<siteMapNode url="Trends.aspx" title="企业动态" description=""/>
</siteMapNode> <siteMapNode url="" title="数据管理" description="">
<siteMapNode url="Stock.aspx" title="进货分析" description=""/>
<siteMapNode url="Sales.aspx" title="销售分析" description=""/>
<siteMapNode url="Stores.aspx" title="库存分析" description=""/>
</siteMapNode> <siteMapNode url="" title="诚信管理" description="">
<siteMapNode url="Rank.aspx" title="诚信排行" description=""/>
<siteMapNode url="Crddits.aspx" title="信用评测" description=""/>
<siteMapNode url="Rules.aspx" title="评测准则" description=""/>
</siteMapNode> <siteMapNode url="" title="服务管理" description="">
<siteMapNode url="Order.aspx" title="订货管理" description=""/>
<siteMapNode url="UpDrug.aspx" title="药品上架" description=""/>
<siteMapNode url="UpDrugType.aspx" title="种类上传" description=""/>
</siteMapNode> <siteMapNode url="" title="两网建设" description="">
<siteMapNode url="Varietie.aspx" title="品种档案" description=""/>
<siteMapNode url="CheckUp.aspx" title="检测上报" description=""/>
<siteMapNode url="Knowledge.aspx" title="用药知识" description=""/>
</siteMapNode> <siteMapNode url="" title="系统管理" description="">
<siteMapNode url="Organizations.aspx" title="组织机构" description=""/>
<siteMapNode url="pwdChange.aspx" title="修改密码" description=""/>
<siteMapNode url="UsersMessage.aspx" title="用户管理" description=""/>
<siteMapNode url="NoticeMessage.aspx" title="公文管理" description=""/>
<!--<siteMapNode url="AddType.aspx" title="增加类型" description=""/>-->
<siteMapNode url="Power.aspx" title="权限管理" description=""/>
</siteMapNode> </siteMapNode><!--</siteMap>-->第3步 新建页面 时选择模板也,就可以实现你说的 需求了