You might want to use the built in ASP.NET validation controls, since they
provide this kind of functionality.
If your needs are modest, the code below may get you started:
This server side code uses javascript to display a confirmation message.
myDeleteButton.Attributes.Add("onclick", _
"return confirm('Are you sure you want to delete?');")
In this example, the Delete button will post back only if the person
confirms they want to delete. Otherwise your server code is never called in
response to the button click.
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Mortar" <a@b.com> wrote in message
news:41***************@nntp.broadband.rogers.com.. .
i have a server side button which 1st needs to run some client side
script for form checking. I got this working from the attributes
thing.
Then, if all is valid client side, i need to call the server side
function for the button. I can't just do a submit because that won't
call the server function. Anyone know how to do this?