Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Disable Input Button From DropDownList

Posted on 2011-03-23
2
Medium Priority
?
763 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 1500 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

In this article you will learn how to create a free basic website on Bitbucket, a git service provider. Polymer creates dynamic HTML components, which allow more flexibility than static HTML. This tutorial uses Ubuntu Linux but can also be done on W…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
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 dynamically set the form action using jQuery.

705 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