Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a custom drop down in .Net

Status
Not open for further replies.

qwert231

Programmer
Joined
Sep 4, 2001
Messages
756
Location
US
K, I can do this with Javascript, but I am writing this in .Net. Not too sure how to mix the two or how to do it in .Net. I have a <DIV> that I want to show and hide. What's the best way to do this?
 
I don't know if I understand....are you asking how to turn a dropdown between two <div> tags on and off programatically?

If so, in your code behind assign the <div> html code or a &quot;&quot; to a public variable as needed and then place that variable on the front end in your html code.
 
Well, I call it a drop down but I guess that is inaccurate. It is basically a table between DIV tags. But I think your Public variable thing will work. It's worked on my datagrids. Give me a few mins.
 
If you simply want to show hide things programatically use the server side panel control and put your drop down/table whatever it is inside the panel control. When the panel is hidden so is everything else within it.

That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Thanks. That's what I ended up doing.
 
Hey! That's cool! I didn't know about the Panel Control. Learn something every day. Thanks, Mark!
 
I thought everything had a visible property?
 
Not html controls, only .net controls. With older controls, if they supported the styles visibility attribute you could work with that. Div tags would do that. I placed my table between some div tags, and with javascript I manipulated the visibility.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top