如何在MVC3中实现Datepicker [英] How to Implement Datepicker in MVC3

查看:77
本文介绍了如何在MVC3中实现Datepicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我的* .cshtml页面中实现一个datepicker控件

而不使用MVC3中的脚本和jquary。

How to implement a datepicker Control in my *.cshtml page
without using script and jquary in MVC3.

推荐答案

你可以在ASP.NET MVC中不使用Javascript和JQuery来实现datepicker。你应该为渲染datepicker创建一个自定义的html帮助器,但它也需要jQuery或Javascript的帮助。在asp.net webform中,他们也使用javascript呈现日期选择器,但它发生在幕后.Microsoft从我们的视图中抽象出代码。如果你想要这样的抽象,请创建一个自定义的HTML帮助器

HTTP:// develoq。 net / 2011 / how-to-create-custom-html-helpers-for-asp-net-mvc-3-and-razor-view-engine / [ ^ ]



希望这有帮助
You can't implement datepicker without using Javascript and JQuery in ASP.NET MVC.Else you should create an custom html helper for rendering datepicker but it also need the help of jQuery or Javascript. In asp.net webform they are also rendering the datepicker using javascript but it's happening behind the scene.Microsoft abstract the codes from our view.If you want such abstraction please Create a custom html helper
http://develoq.net/2011/how-to-create-custom-html-helpers-for-asp-net-mvc-3-and-razor-view-engine/[^]

Hope this helps


这篇关于如何在MVC3中实现Datepicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆