Prompt for Save in ASP.Net Web forms

Discussion in 'ASP .Net' started by SIVAKUMAR, Jun 25, 2003.

  1. SIVAKUMAR

    SIVAKUMAR Guest

    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
    SIVAKUMAR, Jun 25, 2003
    #1
    1. Advertising

  2. SIVAKUMAR

    Rajesh.V Guest

    use js return confirm("Can i save foo"); in the click event of the
    button....

    "SIVAKUMAR" <> wrote in message
    news:0db801c33b69$231ca2f0$...
    > 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, Jun 26, 2003
    #2
    1. Advertising

  3. SIVAKUMAR

    Siva Kumar Guest

    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!
    Siva Kumar, Jun 26, 2003
    #3
  4. 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" <> wrote in message
    news:...
    > 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, Jun 26, 2003
    #4
  5. SIVAKUMAR

    Rajesh V Guest

    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!
    Rajesh V, Jun 26, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tafs7
    Replies:
    0
    Views:
    505
    tafs7
    Dec 29, 2003
  2. =?Utf-8?B?Y2hhcmxpZXdlc3Q=?=

    Newbie: How to upload and save images using ASP.NET web forms (C#)

    =?Utf-8?B?Y2hhcmxpZXdlc3Q=?=, Jul 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,391
    Daniel Walzenbach
    Jul 16, 2005
  3. gaurav kashyap
    Replies:
    2
    Views:
    606
    gaurav kashyap
    Oct 30, 2008
  4. gaurav kashyap
    Replies:
    3
    Views:
    673
    gaurav kashyap
    Oct 31, 2008
  5. Mel
    Replies:
    10
    Views:
    3,096
    Sailaja Appi
    Feb 13, 2009
Loading...

Share This Page