473,324 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

Nov 17 '05 #1
4 4438
use js return confirm("Can i save foo"); in the click event of the
button....

"SIVAKUMAR" <si***@sqlstarintl.com> wrote in message
news:0d****************************@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

Nov 17 '05 #2
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!
Nov 17 '05 #3
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" <an*******@devdex.com> wrote in message
news:uq**************@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!

Nov 17 '05 #4
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!
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: icedgar | last post by:
am using the following script in the BeforeUpdate area of a main form. Private Sub Form_BeforeUpdate(Cancel As Integer) Dim strMsg As String strMsg = "Do you wish to save your changes?" If...
2
by: Morten | last post by:
Hi! I'm wondering what it is that makes IE prompt users to save user name and password. I have a web site coded in C#/.Net and part of it is protected by means of a form. When I key in user name...
3
by: Weston Weems | last post by:
Ok, I've posted on this before, lemme give you guys the run down. I've got an asp form that has postbacks etc. I'd like it so that when navigating away from it, It'll prompt user for save...
5
by: GRB | last post by:
I'm using VB.Net 2003 to build a web page. I need to prompt the client for a name in order to save a list. I used the following code to btnSaveList.Attributes.Add("onclick", "var listname =...
3
by: elainenguyen | last post by:
I have a form call frmMedRec and on this form, I have a cbo box call Patient, then next to the cbo patient, I have a command button "Add a new patient". When the user click on this Add a New Patient...
4
by: ARC | last post by:
Hello all, I didn't use to have this problem in Access 97, but in 2007 (and maybe other versions of access after 97), if you have a form that has a subform, and you click the close button, you...
1
by: Rob Nicholson | last post by:
I've managed to write an ASP.NET v2 web page where the prompt to save the password doesn't appear :-( Not sure why it's not working. Autocomplete on the text boxes is working but when you enter...
1
by: ramprakashjava | last post by:
hi , i hav this error while running this customerDetails.jsp <html:html> <head> <html:base/> </head> <body> <html:errors/> <html:form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.