Web User Controls (Setting properties dynamically)

  • Thread starter Thread starter maflatoun
  • Start date Start date
M

maflatoun

Hi everyone,

I have the following web user control. I like to set the properties
dynamically without using page.databind.

<uc1:partnerdownloads id="Partnerdownloads1" PropDomain="<%= Domain %>"
PropPartnerUserGroupID="<%= PartnerUserGroupID %>"
runat="server"></uc1:partnerdownloads>

However, and <%= Domain %>
and <%# Domain %>

failed.

I have declared Domain as a public. Could someone please tell me how to
fix this?

Thanks
Maz.
 
Hi,
Setting properties can be dynamically achieved using the following code..

((WebUserControl1)Partnerdownloads1).PropDomain= "your value";
((WebUserControl1)Partnerdownloads1).PropPartnerUserGroupID= "your value";

WebUsercontrol1 is the ascx( user control) name..

Hope this would help..

-Baskar-
 
Hi BASKAR BV is there any way to write the property of the ascx and change it
from the properties windows (Designer view) ????????
 
Back
Top