asp.net-mvc – Layout.cshtml上的ASP.NET MVC搜索框
发布时间:2020-12-16 10:02:05 所属栏目:asp.Net 来源:网络整理
导读:我已经创建了搜索表单和 http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application的结果,它使用PagedList Nuget包处理分页和排序. 我需要帮助的是,如何
我已经创建了搜索表单和
http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application的结果,它使用PagedList Nuget包处理分页和排序.
我需要帮助的是,如何将搜索表单放在我的母版页上? (_layout.cshtml)? 解决方法
put a包含一个Text框和一个按钮,表单的动作将是搜索动作
_layout.cshtml页面中的Ex代码 @using(Html.BeginForm("ActionName","ControllerName",FormMethod.Get)) { @Html.TextBoxFor(m => m.Query) <div> <input type="submit" value="Search" /> </div> } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 如何在ASP.NET MVC中禁用客户端和代理缓存?
- asp.net-core-mvc – 在EF7中加载引用
- KCFinder for ASP.NET
- asp.net-mvc – 为什么LINQ to Entities不能识别方法’Syst
- 是否值得使用webform视图引擎将现有的asp.net-mvc项目迁移到
- ASP.NET 2.0到4.0
- asp.net – 错误4005表单身份验证失败 – 提供的故障单已过
- asp.net-mvc – 带有HTML5语义标记的MVC4项目HtmlHelper.Ed
- asp.net-mvc – 使用数据注释进行自定义验证
- asp.net-mvc – 如何使用wmd-editor控件检索markdown和html
推荐文章
站长推荐
热点阅读