Modal Popup Extender, AJAX Tool Kit, Validation Controls ASP.NET
I am using Modal popup Extender in my project which after click save button appears and takes Reason for doing that action as an input. I am using a text box labelling Reason for change; if that box is empty I am telling my transaction to roll back. So to make changes appear in database user has to fill the reason. I wanted to validate that using required validation control of Asp.net but it was firing the validation on parent page so it was not showing me modal popup. Then I used JavaScript to validate that box and it worked. I am using JavaScript behind my modal popup panel OK button which checks if reason to change is empty then show warning and do not proceed until unless user provides the reason for change.
<script type=”text/javascript”>
function ValidateReason()
{
if(document.getElementById(‘<%=txtChangeReason.ClientID%>’).value==“”)
{
alert(“Please enter reason for change!”);
window.event.returnValue = false;
return false;
}
return true;
}
</script>
window.event.returnValue = false; this line cancels all event without this line modal popup was hiding itself without validation. Please leave your comments or anyother way around.
Tags: ajax, Asp.net, Inpute validation with modal popup extender, javascript, modal popup, modal popup extender, validation

yo, http://www.isolutionteam.co.uk great name for site)))
Hello, I can’t understand how to add your blog ( http://www.isolutionteam.co.uk ) in my rss reader
http://www.isolutionteam.co.uk – now in my rss reader)))
————————
sponsor: http://cherry6wf.far-cry-far-cry-2.ru
http://www.isolutionteam.co.uk – great domain name for blog like this)))
————————
sponsor: http://hyundai-hyundai-accent.ru
http://www.isolutionteam.co.uk – now in my rss reader)))
————————
sponsored link: http://lilid.ru/
http://www.isolutionteam.co.uk – great domain name for blog like this)))
————————
ad: http://zehon.ru/
http://www.isolutionteam.co.uk – great domain name for blog like this)))
————————
signature: http://vahar.ru/
http://www.isolutionteam.co.uk – great domain name for blog like this)))
————————
my blog: http://cexiq.ru/
Hi friend,
this code is not working in my web application, if you have any other solution plz tell me.
thanks!
Check this:
http://chamilaw.blogspot.com/2011/05/can-not-put-more-than-one-modalpopup.html
This is best one article so far I have read online. I would like to appreciate you for making it very simple and easy. I have found another nice post related to this post over the internet which also explained very well. For more details you may check it by visiting this url…
Thanks