在标准 Web 表单项目中使用 ASP.NET MVC Html Helpers [英] Using ASP.NET MVC Html Helpers in a standard web forms project
问题描述
因此,例如在 Web 表单 aspx 页面背后的代码中,我希望能够执行诸如
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");
string textBoxHtml = Html.TextBox("MyTextBox");
这可能吗?
源代码是否可以用于 Webforms 的 fork?
Is the source code available to fork for webforms?
推荐答案
可能吗?是的.
Possible? Yes.
整个 MVC 源代码位于:http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
The entire MVC source is available at: http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
祝你好运!
您很快就会发现,从 MVC 中提取一些代码就像只想要一个香蕉而让大猩猩拿着它.;)
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 Helpers的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!