User Controls - help

T

Timothy V

Hi,
I was wondering if there is a way to pass parameters to a User Control
within asp.net.

Thank you,

Timothy.
 
S

Steve C. Orr [MVP, MCSD]

One way is to simply make a public property on your User Control.

Something like this:
Public Property SomeProperty as String
Get
Return m_var
End Get
Set
m_var=value
End Set
End Property

Then from your page you can use code like this:
MyUserControl.SomeProperty="whatever"
 

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

Top