Hi,
I have an application in which before they move to a different form. I
would like a message box to pop up to ask them if they want to save their
changes but I can't figure out how to accomplish this. Any help would be
appreciated
Regards
Brian
Scott M. - 19 Jul 2005 22:08 GMT
Then only way you could accomplish this would be with client-side
JavaScript, since only the browser knows that the url is changing.
> Hi,
>
[quoted text clipped - 5 lines]
> Regards
> Brian
Sreejith Ram - 19 Jul 2005 22:24 GMT
This is discussed in detail @ following thread
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.dotnet.fra
mework.aspnet&mid=79ba970f-d62d-481e-9fb6-4eb114ed0446&sloc=en-us
> Hi,
>
[quoted text clipped - 5 lines]
> Regards
> Brian
Steve C. Orr [MVP, MCSD] - 20 Jul 2005 07:48 GMT
Here's some server side code that 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 the server code is never called in
response to the button click.
Here's a more detailed analysis of your options, including a free control
that can handle many of the options for you.
http://SteveOrr.net/articles/ClientSideSuite.aspx
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
> Hi,
>
[quoted text clipped - 5 lines]
> Regards
> Brian