Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Prompt for Save in ASP.Net Web forms (http://www.velocityreviews.com/forums/t58242-prompt-for-save-in-asp-net-web-forms.html)

SIVAKUMAR 06-25-2003 10:28 PM

Prompt for Save in ASP.Net Web forms
 
hi All,
I had a requirement like, the web form should
prompt for save when the user enters/modifies some data on
the form and trying to go to other form by means of some
Navigation.Then the web form should popup a message box
asking to save.plz tell me how could i handle it. Plz do
help me

Regards,
Siva


Rajesh.V 06-26-2003 10:41 AM

Re: Prompt for Save in ASP.Net Web forms
 
use js return confirm("Can i save foo"); in the click event of the
button....

"SIVAKUMAR" <sivak@sqlstarintl.com> wrote in message
news:0db801c33b69$231ca2f0$a001280a@phx.gbl...
> hi All,
> I had a requirement like, the web form should
> prompt for save when the user enters/modifies some data on
> the form and trying to go to other form by means of some
> Navigation.Then the web form should popup a message box
> asking to save.plz tell me how could i handle it. Plz do
> help me
>
> Regards,
> Siva
>




Siva Kumar 06-26-2003 11:39 AM

Re: Prompt for Save in ASP.Net Web forms
 
That's fine,
But i am not using HTML controls for Navigation.I am using web
controls(web button). If i execute that javascript with
RegisterStartupScript() function.Then how can i capture the value of the
Message box in my .vb file Based on the that value i should save the
data on the form if he press "yes" else he should go the the next page.
plz do help me.

Regards,
Siva


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Kevin Spencer 06-26-2003 12:15 PM

Re: Prompt for Save in ASP.Net Web forms
 
You can use the body "onbeforeunload" event to do this.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Big things are made up of
lots of Little things.

"Siva Kumar" <anonymous@devdex.com> wrote in message
news:uqIWae9ODHA.3836@tk2msftngp13.phx.gbl...
> That's fine,
> But i am not using HTML controls for Navigation.I am using web
> controls(web button). If i execute that javascript with
> RegisterStartupScript() function.Then how can i capture the value of the
> Message box in my .vb file Based on the that value i should save the
> data on the form if he press "yes" else he should go the the next page.
> plz do help me.
>
> Regards,
> Siva
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!




Rajesh V 06-26-2003 12:28 PM

Re: Prompt for Save in ASP.Net Web forms
 
Say the cmd button is cmd1
then
cmd1.attributes.add("onClick","return confirm(""Ok to delete"");")


.Net Developer,
247customer.com
Bangalore, India.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT. The time now is 10:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.