Insus.net has written a "asp.net mvc display UserControl control (extension)" http://www.cnblogs.com/insus/p/3642634.html, has not finished this article, there are netizens asked, how to interact. This interaction refers to the problem of assigning values and getting them.
The insus.net to demonstrate an example of assigning values to controls within ascx after ASP.net mvc loads a user control (ascx).
To assign values to ascx, you can first refer to the user control (ASCX) property assignment http://www.cnblogs.com/insus/p/3154363.html. We can use the MVC application as a minor modification.
Open the AscxUtility.cs class in the Utilities directory, add a method rendercontrol<t> (), and overload it by passing in different parameters. Look at the detailed code:
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/aspx/
In the Aspnets directory, create a user control that simply demonstrates that Insus.net pulls a TextBox control in ascx:
. Ascx.cs: