Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to pass a parameter to a user control?

CONTROL parameter pass user
0
Posted

How to pass a parameter to a user control?

0

>Create a User Control Below Code goes in User Control Create a property called source VB Public Property source() As String Get Return ImageButton1.ImageUrl End Get Set(ByVal Value As String) ImageButton1.ImageUrl = Value End Set End Property C# public string source { get { return ImageButton1.ImageUrl; } set { ImageButton1.ImageUrl = value; } } Now in your webform: Drag and drop User Control and set the source property.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123