Hiding a DIV tag (and contents) from inside codebehind

  • Thread starter Thread starter xlar54
  • Start date Start date
X

xlar54

Can someone explain to me how this can be done? I have a div tag with
contents, that I would like to hide under certain circumstances (such
as variableA = 1), etc.

Thanks
 
Can someone explain to me how this can be done? I have a div tag with
contents, that I would like to hide under certain circumstances (such
as variableA = 1), etc.

Thanks

Nevermind - found it. Adding runat=server to the div tag and giving
it an id, then within the codebehind, I can do:

Page.Form.FindControl("blah").Visible = false;

where id="blah"

...passing it on for the next to ask...(or my later reference when I
forget)
 

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