Solved

Disable Input Button From DropDownList

Posted on 2011-03-23
2
744 Views
Last Modified: 2012-05-11
in a C#  ASP.NET project I want to disable an Input button (browser side) when a selection is made on a server side dropdownlist control.

If I use javascript to disable the button, it is enabled again once the postback is complete.  I don't know  how to access a session variable on the server from the browser so I'm kinda stuck.

Thanks for any suggestions.
0
Comment
Question by:robtroller
2 Comments
 
LVL 2

Accepted Solution

by:
enkor earned 500 total points
ID: 35198037
try to generate the disabling JavaScript to the end of the page
-create <asp:Literal> at the end of page
-at end od Page_Load input the JS into the Literal
0
 

Author Closing Comment

by:robtroller
ID: 35199623
I realized I was populating a hidden field on the form from the codebehind each time the dropdown was selected.  I am using that value as a comparison to fire off the javascript when the value is detected in the Body On Load event.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question