在一个标准的Web窗体项目中使用ASP.NET MVC HTML辅助 [英] Using ASP.NET MVC Html Helpers in a standard web forms project

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

问题描述

因此​​,例如在Web表单aspx页面背后的code,我想能够做的事情一样。

字符串textBoxHtml = Html.TextBox(MyTextBox);

这可能吗?

可到餐桌的web表单源$ C ​​$ C?


解决方案

  1. 可能吗?是的。


  2. 整个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?

解决方案

  1. Possible? Yes.

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

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