By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

Question about displaying hidden controls

P: n/a
I've given up trying to use the AJAX ModalPopupExtender and have opted,
instead, for using a hidden dropdownlist on my form. How do I get the
dropdownlist and it's corresponding label to display when a user enters a
value in a textbox? I thought about doing so whenever OnKeyDown or
OnKeyPress or, even, the OnTextChanged within that text box are fired, but I
can't seem to get it to work.
May 30 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I wish it was possible to go back and edit a post; since it isn't, I thought
I'd clarify my post a bit by stating that I'd like to display the controls
without having to do a postback. As it is now, I can display the controls
only if the user clicks on the OK button.
May 30 '07 #2

P: n/a
First of all, you need to hide the ddl with a css rule display:none. If you
use Visible=false, the ddl won't be rendered to the client.

In the javascript events you are going to handle you will need to call this
code:

myDdl = [some code that locates the ddl]
myDdl.style.display='inline';

The exect code that locates the ddl depends on your page. If it is not in a
master page neither inside a user control, you can use
myDdl = document.getElementById('ddlId');

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"AlBruAn" <al*****@hotmail.com.(donotspam)wrote in message
news:CC**********************************@microsof t.com...
I've given up trying to use the AJAX ModalPopupExtender and have opted,
instead, for using a hidden dropdownlist on my form. How do I get the
dropdownlist and it's corresponding label to display when a user enters a
value in a textbox? I thought about doing so whenever OnKeyDown or
OnKeyPress or, even, the OnTextChanged within that text box are fired, but
I
can't seem to get it to work.

May 30 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.