Hi, I am new in asp.net. I have created an user control containig 3 dropdownlist (date/month/year) now how to get the value of the user control in aspx page.

Thanks in advance.

Recommended Answers

In the page directives at the top of your .aspx page you need to register the user control.

<%@ Register TagName="whatever" TagPrefix="uc" Src="location_of_control_file" %>

then in the page, where you want it to be, you reference it with the tagPrefix and the name. So, in my …

Jump to Post

All 2 Replies

In the page directives at the top of your .aspx page you need to register the user control.

<%@ Register TagName="whatever" TagPrefix="uc" Src="location_of_control_file" %>

then in the page, where you want it to be, you reference it with the tagPrefix and the name. So, in my example it would be:

<uc:whatever id="" runat="server" />

You can access user controls through properties. In your User Control code behind create a property (for accessing the controls).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.