I am trying to pass the value of a varible to a user control (code behind) from the host page of the user control. In the uc code behind I am using Get...Set to retrive the value and if I use a static string (i.e "blk") it works but I cannot get it to work using (<%#variable%>. Here is the code:
In the user control code behind
Here is the code from the host pageCode:Public mainSkin As String Public Property ucSkin() As String Get Return ucSkin End Get Set(ByVal value As String) mainSkin = value End Set End Property
Where varSkin is declared as Public in the code behind of the host page.Code:<jsFlsAd:flsAd id="FlsAd" runat="server" ucSkin= "<%#varSkin%>"></jsFlsAd:flsAd>
The above line does not work, however if I change it to:
That will work.Code:<jsFlsAd:flsAd id="FlsAd" runat="server" ucSkin= "blk"></jsFlsAd:flsAd>
Can someone help me understand what I am doing wrong?




Reply With Quote