在标准 Web 表单项目中使用 ASP.NET MVC Html Helpers [英] Using ASP.NET MVC Html Helpers in a standard web forms project

查看:12
本文介绍了在标准 Web 表单项目中使用 ASP.NET MVC Html Helpers的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,例如在 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?

推荐答案

  1. 可能吗?是的.

  1. 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屋!

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