user controls with parameters

T

tvkarthick

Hi,

As I am dynamically loading a user control in a web form (.aspx), I am
wondering if I can pass one or more parameter(s) to the user control
and use after loading it.

The reason is, because that I load the user control based on certain
conditions using Dataset, I don't want to make another call to the
Dataset, when the user control loads up; moreover, I can't load the
user control without the needed parameters such as reference id etc.
Please help.

Any example is much appreciated. Thanks.

Karthick
 
S

Steve C. Orr [MVP, MCSD]

Yes, you can make public methods and properties in your user control that
can be called by the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top