Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

Question about displaying hidden controls


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.
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.

-----------------------------------------------Reply-----------------------------------------------
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" <albr@hotmail.com.(donotspam)> wrote in message

news:CCAB2C4F-DC37-4741-A9C3-B3CC3BCEE7A6@microsoft.com...

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc