Validation With Drop Down List
How can i use validation with Drop down List?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 24, 2012, 10:20 PM EDT
Suppose in your application you are using a DropDownList in a Form and depending upon the item selection you are showing/hiding some views inside a Multiview and you want that the user must select one of the item from the DropDownList before submitting a Form.
So How to handle this problem. The solution is very simple, you have to do the following things -
Make CausesValidation="false" for the DropDown.
Remove any validation group for that DropDown, i.e ValidationGroup="none"
Handle client side change event to avoid Blocking of Submit on DropDown item change, i.e onchange="Page_BlockSubmit = false;"
Please refer the below link
http://www.mindfiresolutions.com/DropDownList-Validation-problem-in-ASPNET-736.php
Thanks
If this post helps you mark it as answer
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Oct 24, 2012, 10:15 PM EDT
Mostly you need to to validation in Dropdownlist_Selectionchangedevent
Dorababu MekaRank #457 · 5.5K reputationPosted Oct 24, 2012, 10:16 PM EDT
Sachin KaliaRank #102 · 20.8K reputationPosted Oct 24, 2012, 10:16 PM EDT
These are few links which would help you out to enable validation on dropdownlist using server side as well as client side.
http://asp-net-example.blogspot.in/2008/10/dropdownlist-example-how-to-validate.html
http://www.mindfiresolutions.com/DropDownList-Validation-problem-in-ASPNET-736.php
http://www.codeproject.com/Tips/404274/Client-Side-Validation-using-JavaScript
Happy Coding !
Swati AgarwalRank #1,589 · 999 reputationPosted Oct 25, 2012, 10:30 PM EDT
Swati AgarwalRank #1,589 · 999 reputationPosted Oct 25, 2012, 10:31 PM EDT