I'm having an odd problem with my <%= %> blocks within the aspx page (well, actually all the problems have been on ascx pages).
I have this on an ASCX page:
Based on if m_Id is > 0, I make the link visible. After I make the link visible, it is rendered as such
I am setting m_Id to a value and keeping it's state. I finally got fed up with this and made the NavigateUrl property equal to the javascript in code behind after the postback if m_Id > 0. This works because I am not using a <%= %> block, but my CSS style is all messed up after the link is made visible!!!!
Does anyone know why these things happen and if there is a fix... or maybe I'm doing something wrong.. any help would be appreciated.
Best regards,
Akusei
I have this on an ASCX page:
Code:
<asp:HyperLink id=LnkProfile NavigateUrl="javascript:openNewWindow2('[URL unfurl="true"]http://www.xxxx.com/xxxx/xxxx.asp?id=<%=m_Id%>',[/URL] 500, 500);" Runat="server" Visible="False" CssClass="menu">Profile</asp:HyperLink>
Based on if m_Id is > 0, I make the link visible. After I make the link visible, it is rendered as such
Code:
<a id="whatever_LnkProfile" href="javascript:openNewWindow2('[URL unfurl="true"]http://www.xxxx.com/xxxx/xxxx.asp?id=<%=m_Id%>',[/URL] 500, 500);" Class="menu">Profile</a>
I am setting m_Id to a value and keeping it's state. I finally got fed up with this and made the NavigateUrl property equal to the javascript in code behind after the postback if m_Id > 0. This works because I am not using a <%= %> block, but my CSS style is all messed up after the link is made visible!!!!
Does anyone know why these things happen and if there is a fix... or maybe I'm doing something wrong.. any help would be appreciated.
Best regards,
Akusei