473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to get <DIV> in code behind page

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">
Nov 18 '05 #1
5 27591
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?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Robert" <an*******@discussions.microsoft.com> wrote in message
news:ad****************************@phx.gbl...
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">

Nov 18 '05 #2
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.

"Robert" <an*******@discussions.microsoft.com> wrote in message
news:ad****************************@phx.gbl...
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">

Nov 18 '05 #3
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.

"Robert" <an*******@discussions.microsoft.com> wrote in message
news:ad****************************@phx.gbl...
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">

Nov 18 '05 #4
http://www.asp.net/Forums/ShowPost.a...&PostID=465735

"Michael Ramey" <raterus@localhost> wrote in message
news:eH**************@TK2MSFTNGP11.phx.gbl...
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.

"Robert" <an*******@discussions.microsoft.com> wrote in message
news:ad****************************@phx.gbl...
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">


Nov 18 '05 #5
Sorry I'm new at .NET and VB.NET. Thanks, using the
Panel Control was exactly what I needed.
-----Original Message-----
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.

"Robert" <an*******@discussions.microsoft.com> wrote in messagenews:ad****************************@phx.gbl...
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">

.

Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: shivendravikramsingh | last post by:
hello friend,i m using this code<div id="get" style="visibility:hidden"><? include "time_title.php" ?></div> in a php page,i want when page load the inclued page time_tiltle.php should not shown,when...
2
by: ShankerNair | last post by:
Howdy all, I would like to manipulate an HTML tag - a <div>, using ASP.NET, C# is the code behind. The tag would look something like this - <div id="divLime" style="visiblity:hidden"> ...
3
by: lilOlMe | last post by:
I'm using Ajax to help make my webpage appear to be smoother. When a control has submitted, I would like to prevent any controls within that control from resubmitting until the request has...
5
by: truezplaya | last post by:
Hi I am making a mash up and i have a CSS layout. I am trying to send a page to a certain area of the CSS once a link is clicked. I am having trouble just sending a page to part of the CSS. Can...
4
n8kindt
by: n8kindt | last post by:
i have no idea what to do on this one. no <div> containers were previously on any of the pages used with this stylesheet. i just started tinkering with javascript and decided it would make sense to...
1
by: saadkhan | last post by:
I`v made the following code: <div id="Panels" style="width: 28%;"> <asp:Panel ID="one" runat="server" CssClass="Panel"> <div id="Head" onclick="doToggle();"> ...
1
by: gaya3 | last post by:
Hi All, In my dojo grid application, want to create <div> tag inside another <div> tag by using document.createElement('DIV'); I done as follows var outerNode =...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
2
Frinavale
by: Frinavale | last post by:
I've created a ASP.NET control that displays a "book" of schedules. It dynamically displays scheduling times and allows the user to page through the schedules. It also lets the user edit the...
10
by: Manikrag | last post by:
Hi Team, I searched a lot on this but could not find anything, so I am posting it here. I am using an AutoCompleteExtender in a user control which is in a master page. The page layout is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.