Web User Control

  • Thread starter Thread starter mazdotnet
  • Start date Start date
M

mazdotnet

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.
 
mazdotnet said:
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>

Have you declared PropDomain and PropPartnerUserGroupID as public properties
in your web user control? If you use <%# ... %> make sure you use it in
combination with the container's DataBind() method (webform, repeater,
datagrid, etc), if not it will never render that property.
 

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

Back
Top