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

Hide Div

Hi,

I am trying to make a <div> invisible when I call page.aspx.

When I call page.aspx?type=1 the <div> should be visible.

I have this line:
<div runat="server" visible='<%# Request.QueryString("type") <> ""
%>'"></div>

I get this error: "The server tag is not well formed"

Why I get this?

Thanks,
Miguel
Nov 19 '05 #1
5 6053
Miguel,
You can't do that. Set it to visible='false' in the div, give the div a
name such as div1, then add some VB or C# code that makes the change.
In VB:

if request.querystring("type") <> "" then div1.visible = "true"
Hope that helps,
Jason

Nov 19 '05 #2
I think you have an extra " right before ></div>

Also, I think you are going to want your expression to return True or False.

"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:u3****************@TK2MSFTNGP11.phx.gbl...
Hi,

I am trying to make a <div> invisible when I call page.aspx.

When I call page.aspx?type=1 the <div> should be visible.

I have this line:
<div runat="server" visible='<%# Request.QueryString("type") <> ""
%>'"></div>

I get this error: "The server tag is not well formed"

Why I get this?

Thanks,
Miguel

Nov 19 '05 #3
Yes, I notice that just now. Thanks.
But it's still not working. I believe I need to set it as true or false.
How should I do it?

However I get many answers like the one of Jason.
Is there a problem in doing it this way?

Thanks,
Miguel

"Marina" <so*****@nospam.com> wrote in message news:so*****@nospam.com:
I think you have an extra " right before ></div>

Also, I think you are going to want your expression to return True or
False.

"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:u3****************@TK2MSFTNGP11.phx.gbl...
Hi,

I am trying to make a <div> invisible when I call page.aspx.

When I call page.aspx?type=1 the <div> should be visible.

I have this line:
<div runat="server" visible='<%# Request.QueryString("type") <> ""
%>'"></div>

I get this error: "The server tag is not well formed"

Why I get this?

Thanks,
Miguel


Nov 19 '05 #4
No, I think it's fine. Basically, your expression should return the string
True or False.

If you do it his way, then set the Visible property to False or True, not to
the string. That property is a boolean not a string.

"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Yes, I notice that just now. Thanks.
But it's still not working. I believe I need to set it as true or false.
How should I do it?

However I get many answers like the one of Jason.
Is there a problem in doing it this way?

Thanks,
Miguel

"Marina" <so*****@nospam.com> wrote in message news:so*****@nospam.com:
I think you have an extra " right before ></div>

Also, I think you are going to want your expression to return True or
False.

"Miguel Dias Moura" <md*REMOVE*moura@*NOSPAM*gmail.com> wrote in message
news:u3****************@TK2MSFTNGP11.phx.gbl...
Hi,

I am trying to make a <div> invisible when I call page.aspx.

When I call page.aspx?type=1 the <div> should be visible.

I have this line:
<div runat="server" visible='<%# Request.QueryString("type") <> ""
%>'"></div>

I get this error: "The server tag is not well formed"

Why I get this?

Thanks,
Miguel

Nov 19 '05 #5
Hello.
My apologies. It appears that your code (with the changes indicated in
other posts) should work. My code may be more familiar to people, but
your technique shoudl work too. :)
Jason

Nov 19 '05 #6

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

Similar topics

5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
3
by: alex | last post by:
I'd like to have a show/hide widget on my web site, kind of like "show details" / "hide details" in Google Groups. Is there a tutorial explaining how to make them? Google's is a bit complex and...
0
by: Efkas | last post by:
I have a full custom application with some widged extending Controls like Label and PictureBox. I build a menu with these widgets. When I click on one of them, it calls a function to display...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
5
by: ali | last post by:
Hello every one i need you help regarding div hide and show. i am having a link like <a href="#" onClick="expandWin()">show/hide </a> <div id=showHide> </div> within div i have lots of...
1
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. ...
6
by: Ralph | last post by:
Hi, I was reading effictive C++ and some other books again and they all tell you about hiding implementation details (proxy/pimpl/inheritance) but they never really explain when to use it. I...
6
by: Doogie | last post by:
Hi I have an img control I am trying to hide upon certain types of commands in my code behind. When to hide it is directly tied to a asp:dropdownlist control. So depending on what the user...
2
by: richard | last post by:
In using the simple code below, how do I tell it NOT to hide a division when the link is clicked on if that division is already visible? would it be as simple as using a 2nd function and setting...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.