473,386 Members | 1,823 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,386 software developers and data experts.

<Div reference in asp.net

A very basic question: how can I set the visible property of a Div section in
the Page_load Sub?

I tryed:

Protected Sub Page_Load( ...

Me.Master.FindControl("MyDivName").Visible= true

End Sub
HTML form:

<DIV id="MyDivName" ...... /DIV>

Thanks

--
bruno
Jul 26 '06 #1
4 1639
Set the div to have a runat="server" attribute. You can then
programmatically alter any property server-side.

eg:

<div id="mydiv" runat="server"></div>

And in page_load:

mydiv.InnerHtml = "text in my div"

or

mydiv.Visiible = False

bruno wrote:
A very basic question: how can I set the visible property of a Div section in
the Page_load Sub?

I tryed:

Protected Sub Page_Load( ...

Me.Master.FindControl("MyDivName").Visible= true

End Sub
HTML form:

<DIV id="MyDivName" ...... /DIV>

Thanks

--
bruno
Jul 26 '06 #2
ASP:Panel control is equivalent to DIV HTML tag. You can use Panel control
and then control its attributes at run time.
"bruno" <br***@community.nospamwrote in message
news:4A**********************************@microsof t.com...
>A very basic question: how can I set the visible property of a Div section
in
the Page_load Sub?

I tryed:

Protected Sub Page_Load( ...

Me.Master.FindControl("MyDivName").Visible= true

End Sub
HTML form:

<DIV id="MyDivName" ...... /DIV>

Thanks

--
bruno

Jul 26 '06 #3
Thank you very much
--
bruno
"Winista" wrote:
ASP:Panel control is equivalent to DIV HTML tag. You can use Panel control
and then control its attributes at run time.
"bruno" <br***@community.nospamwrote in message
news:4A**********************************@microsof t.com...
A very basic question: how can I set the visible property of a Div section
in
the Page_load Sub?

I tryed:

Protected Sub Page_Load( ...

Me.Master.FindControl("MyDivName").Visible= true

End Sub
HTML form:

<DIV id="MyDivName" ...... /DIV>

Thanks

--
bruno


Jul 26 '06 #4
thanks
--
bruno
"Winista" wrote:
ASP:Panel control is equivalent to DIV HTML tag. You can use Panel control
and then control its attributes at run time.
"bruno" <br***@community.nospamwrote in message
news:4A**********************************@microsof t.com...
A very basic question: how can I set the visible property of a Div section
in
the Page_load Sub?

I tryed:

Protected Sub Page_Load( ...

Me.Master.FindControl("MyDivName").Visible= true

End Sub
HTML form:

<DIV id="MyDivName" ...... /DIV>

Thanks

--
bruno


Jul 26 '06 #5

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

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
2
by: chirs | last post by:
Hi, What are the menu and cmd attributes in the following code? I could not find the information for these two attributes to be used in a <DIV> tag. Someone told me that you can define...
8
by: Daniel Hansen | last post by:
I know this must seem totally basic and stupid, but I cannot find any reference that describes how to control the spacing between <p>...</p> and <div>...</div> blocks. When I implement these on a...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
5
by: hibernate | last post by:
I'm somewhat new to javascript/DHTML, and this problem has been plaguing me. I have made an 'array' of <div> tags within my html document like so: <div id="menu"> menu1 </div> <div id="menu">...
10
by: Eric-Sebastien Lachance | last post by:
Hey there, I decided to just create a 100% height and width div that filled the space over a background header image, and add an onclick event to redirect to the my index... Doesn't seem to work...
4
by: David | last post by:
I attempted the following <div id="div" runat="server"> <tr><td></td></tr> <tr><td></td></tr> </div> This is to hide a group of rows depending on some business rules in my code behind.
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
1
by: Num GG | last post by:
Wow... this post is pretty unreadable. Ok, i'll try to make it simpler: I've got this first page: ----------------------------------------------------------- <div id=1>some text here</div>...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.