Solved

Disable Input Button From DropDownList

Posted on 2011-03-23
2
725 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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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 …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now