Solved

Disable Input Button From DropDownList

Posted on 2011-03-23
2
734 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

773 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