Problem showing confirm dialog on button webcontrol's onclick even

G

Guest

Hi,
I am facing strange problem
I read Scott mitchell's article about ASP.NET and javascript at

http://www.msdn.microsoft.com/libra...ibrary/en-us/dnaspp/html/clientsidescript.asp

where he has talked about creating a base class for displaying alerts and
confirms after and before postbacks respectively.

I used that Base class to inherit on of my code behind classes and and i
also called the method to attach a confirm (javascript method ) script on a
button's onclick event .
The page works fine so long as there are no validations on the page but as
soon as i incorporate validations the confirm box still apears but the page
validations are skipped and the form is posted back.

This happnes since asp.net also inserts some code for validation after my
code for client side validation methods
it looks somethings like this

onclick='return confirm(message);if (typeof(Page_ClientValidate) ==
'function') Page_ClientValidate(); '

I feel is somehow i can insert my confirm script after the code inserted by
asp.net , then propably my problem is solved.


Please help.

Thanks and Regards

Tarun Upadhyaya
MCP (VB.NET & SQL Server 2000)
 
G

Guest

Oh man, that was so simple.
Thanks a lot Mr Blum.
I had seen you validation controls and beleive me, they are rocking.

Thanks again you have saved many days.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top