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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.