在一个标准的Web窗体项目中使用ASP.NET MVC HTML辅助 [英] Using ASP.NET MVC Html Helpers in a standard web forms project
问题描述
因此,例如在Web表单aspx页面背后的code,我想能够做的事情一样。
字符串textBoxHtml = Html.TextBox(MyTextBox);
这可能吗?
可到餐桌的web表单源$ C $ C?
-
可能吗?是的。
-
整个MVC源,请访问:
<一href=\"http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en\">http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
祝你好运!
您很快就会发现code那拉出位的MVC就像只想要一个香蕉和获取大猩猩抱着它。 ;)
So for example in the code behind of a web form aspx page I would like to be able to do things like
string textBoxHtml = Html.TextBox("MyTextBox");
Is this possible?
Is the source code available to fork for webforms?
Possible? Yes.
The entire MVC source is available at: http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
Good luck!
You'll quickly find that pulling bits of code out of MVC is like only wanting a banana and getting the gorilla holding it. ;)
这篇关于在一个标准的Web窗体项目中使用ASP.NET MVC HTML辅助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!