I have the code below which it doesn't work, the anchor tag has empty href. When I debug, the code steps into the User Control OnLoad and assign value to the public variable. So I am not understanding what's going on. Any help will be appreciated.
Thanks
User Control CS
public string CreditInformationUrl = "Default URL";protected override void OnLoad(EventArgs e){ base.OnLoad(e); if(!condition) CreditInformationUrl = "Custom URL";}
User Control ACSX
<a href="<%# CreditInformationUrl %>">
ASPX Page
<%@ Register src="~/UserControls/Form.ascx" tagname="Form" tagprefix="uc1" %><uc1:Form id="CutomForm" runat="server"></uc1:Form>
Go to the complete details ...