c# - Changing the CSS in code behind asp.net -
in aspx page have div..
<div id="downloadableproducts" runat="server"><a href="#">downloadedable products</a></div>
i trying change css in code behind this..
downloadableproducts.style("display") = "none";
but not work, error , red underline under downloadableproducts in code behind , says 'the name 'downloadableproducts' not exist in current context '
what doing wrong?
you need add runat="server" div , access htmlcontrol in codebehind. example:
htmlcontrol div1 = (htmlcontrol)page.findcontrol("downloadableproducts");
Comments
Post a Comment