Solved

Disable Input Button From DropDownList

Posted on 2011-03-23
2
749 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 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