asp.net mvc how to get control values or assignments after the user control is loaded

Source: Internet
Author: User

Some netizens read this article "asp.net mvc loading ascx, and assign value" after http://www.cnblogs.com/insus/p/3643254.html, When asked about Insus.net, you don't want to assign values within the control system, you want to use jquery in the view to get or assign values to the controls within the user control. How do you want to do that?

Below insus.net spend less time, do a simple example, demo and share the implementation of the method.

Before implementing, modify the public static htmlstring rendercontrol<t> (String path) method in the AscxUtility.cs class.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/aspx/

Because Web control needs to be placed within a form to run.

Create a user control Uc1.ascx:

In the controller, create two action:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.