How to get <DIV> in code behind page

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

In the page behind code during the Page_Load event, how
can I get/set the attributes of a <DIV> tag using
VBScript?

For example, with the following <div> tag, how do I get
to this object and change the style attribute to DISPLAY:
block?

<div id="divTopicHeading2" style="DISPLAY: none">
 
easiest is give it a "runat=server" tag, then declare it in the codebehind
and use the .Attributes call.

Also, are you talking VBScript or VB.NET? I hadn't heard of any vbscript in
ASP.NET?
 
Try using a Panel Control. It renders a div.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Be sure to check your replies over at the asp.net/forums as well. I'm
really glad to see that you have learned how to cut/paste your questions so
the most amount of people possible get the chance to spend their time
answering your question that has already been answered.
 
Sorry I'm new at .NET and VB.NET. Thanks, using the
Panel Control was exactly what I needed.
 
Back
Top