473,513 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide and Show Div on Page_Load

Hello,

I need to hide or show a div on page_load. How can I do it?

I have this in my aspx.vb file:
....
dloginerror.visible = "false"
....

But it says the name is not declared.
How can I declare it?

Is this the right way to do this?

Thanks,
Miguel

Nov 19 '05 #1
3 1642
create an <asp:Panel> in your apsx page, click on the designer then hit
F7 to go to the code behind,

you should now have a class member variable that you can set visible

Nov 19 '05 #2
I just solved it by declaring:
Protected WithEvents myDiv As HtmlGenericControl

Is there any problem of using a div instead of an asp:panel?

What are the good and bad things about one and the other?

Thanks,
Miguel

"ga**********@gmail.com" <ga**********@gmail.com> wrote in message
news:ga**********@gmail.com:
create an <asp:Panel> in your apsx page, click on the designer then hit
F7 to go to the code behind,

you should now have a class member variable that you can set visible


Nov 19 '05 #3
Its fine to do it like you have, you get more control be creating a
panel though

The Panel is a server side control and therefore has properties and can
participate in viewstate

Nov 19 '05 #4

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

Similar topics

3
2581
by: Lynn | last post by:
Hello, I have a user control that contains a table, and some text fields. I would like to show or hide a particular row of this table, based on a selection the user makes on my page. Here's the situation...I have a page that has some panels that are hidden. The first panel is visible...the user selects a city, and presses submit. The...
4
1668
by: Steve Lewis - Website Nation | last post by:
In Classic ASP, if I wanted to show or hide a section of a page, I could simply do: <% If Variable = X Then %> <p> Html or anything else to hide here </p> <% End If %> What is the best way to do this in ASP.Net? I have come across
2
14860
by: K B | last post by:
Hi, Is there ANY WAY to hide a row/field in a DetailsView based on meeting a condition at the ItemCreated or ModeChanging event -- or any other way? There appears not to be, but I was hoping for confirmation before totally giving up. Thanks, Kit
4
6398
by: Asaf | last post by:
Hello, I have a domain URL on a shared hosting server for example www.mydomain.com When accessing www.mydomain.com I would like to get the ASPX files from other domain on other server for example www.otherdomain.com but I would like the URL on the browser for all the ASPX files will always stay on www.mydomain.com so the one who browse my...
1
4152
by: pamate | last post by:
hi, I want to show hide layers. I am able to show and hide layers but i am facing problem that, cant view the cursor in Mozilla,but i can type in input text box, its overlapping the layers. I don`t want to change the way i have used to show and hide layers. check down code :- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
2
1920
by: Mic | last post by:
Hi, How can I hide a button before executing a javascript function and make it visible again after execution of the javascript function? What I need to do is: VB Page_Load: 1) Hide Button1: Button1.Visible = False 2) Execute JavaScript (I'm using
3
3922
by: PhilTheGap | last post by:
Hello, I woulf like to hide an activeX object in a aspx page. The ActiveX is decalred statically in the HTML code, and I'e tried to set the html visible "property" to "false" in the javascript page_load function (in the aspx page). It didn't do anything although the code is executed correctly (I check with an alert...). Do you see why ?
5
4460
by: Mike P | last post by:
How would I show or hide a div that is using client side Javascript based upon a server side variable? Here are my divs : <div id="idButton5" class="otherLeftBarLink" onmouseover="javascript: changeStylesMouseOver('5');" onmouseout="javascript: changeStylesMouseOut('5');" onclick="location='/AddProject.aspx'"> <div...
5
18172
by: sweetneel | last post by:
hi, all i have an asp.net web application. there is a master page and content pages. my startup page is default.aspx, which is a content page. i have a div portion in my default.aspx page. Now i want to hide this div Portion when the Page_Load(). i have written a javascript, & call it in the <Body...
0
7270
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7397
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7565
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5704
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5103
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4759
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.