Windows

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Page Refresh Problem.....

    6 answers - 4669 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    No i am not writing in PageLoad() event
    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind
    Save button is a Web Server Control
    With Regards,
    Pankaj Tyagi
    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem
    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.
    Kind Regards,
    Robert A Heeley
    http://www.rahsoftware.com
    http://www.lightninghosts.net
    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High
    No, it is not working
    With Regards,
    Pankaj
    Message
    From: realhossam
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:17 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    is that working fine with u ?
    what rob64464 (AT) yahoo (DOT) co.uk told u ?
    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:
    why you give this problemalot of of mails
    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer
    don't consume your time.
    If (!IsPostback)
    {
    DoMethodsForFirstTime();
    SecondMethod();
    IntilizeComponent();
    }
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 1:38 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    I have tried this also
    But clearing controls after Inserting values is not resolving the problem
    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted
    Pankaj
    Message
    From: realhossam
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:03 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem
    I think the solution is to simply clear the controls using code in the event of the button save.
    void btnSave_Click(object sender,EventArgs e)
    {
    InsertValues();
    ClearControls();
    }
    I think this is like a work around for this problem.
    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:
    Simple, try this
    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time. Hope this helps J
    Kind Regards,
    Robert A Heeley
    http://www.rahsoftware.com
    http://www.lightninghosts.net
    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High
    Hi Everyone,
    i have a very simple question regarding ASP .net (Using C#)
    i have a data entry form, on save click record gets inserted in databse.
    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this
    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen
    For this, i do not want to put validation on database end How can i do this
    Thanks in advance
    With Regards,
    Pankaj Tyagi
    VCLABS,
    New Delhi, India
    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
    YAH! GRUPS LINKS
    a Visit your group "Microsofts_C_Sharp" on the web.
    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com
    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
  • No.1 | | 4909 bytes | |

    can you plz send us a snapshot of this
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:28 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    No i am not writing in PageLoad() event

    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind

    Save button is a Web Server Control

    With Regards,
    Pankaj Tyagi

    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    No, it is not working

    With Regards,
    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 5:17 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    is that working fine with u ?

    what rob64464 (AT) yahoo (DOT) co.uk told u ?

    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:

    why you give this problemalot of of mails

    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer

    don't consume your time.

    If (!IsPostback)

    {

    DoMethodsForFirstTime();

    SecondMethod();

    IntilizeComponent();

    }

    Message

    From: Pankaj Tyagi

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 1:38 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    I have tried this also

    But clearing controls after Inserting values is not resolving the problem

    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted

    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 3:03 PM

    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    I think the solution is to simply clear the controls using code in the event of the button save.

    void btnSave_Click(object sender,EventArgs e)

    {

    InsertValues();

    ClearControls();

    }

    I think this is like a work around for this problem.

    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:

    Simple, try this

    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time. Hope this helps J

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    Hi Everyone,

    i have a very simple question regarding ASP .net (Using C#)

    i have a data entry form, on save click record gets inserted in databse.

    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this

    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen

    For this, i do not want to put validation on database end How can i do this

    Thanks in advance

    With Regards,
    Pankaj Tyagi

    VCLABS,

    New Delhi, India

    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football

    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    YAH! GRUPS LINKS

    a Visit your group "Microsofts_C_Sharp" on the web.

    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com

    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

  • No.2 | | 5453 bytes | |

    i hav attached snapshot of screen in word file with my comments

    if any clarification in needed, then please ask me

    With Regards,
    Pankaj Tyagi
    Message

    From: ahmed
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 6:02 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    can you plz send us a snapshot of this
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:28 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    No i am not writing in PageLoad() event

    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind

    Save button is a Web Server Control

    With Regards,
    Pankaj Tyagi

    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    No, it is not working

    With Regards,
    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 5:17 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    is that working fine with u ?

    what rob64464 (AT) yahoo (DOT) co.uk told u ?

    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:

    why you give this problemalot of of mails

    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer

    don't consume your time.

    If (!IsPostback)

    {

    DoMethodsForFirstTime();

    SecondMethod();

    IntilizeComponent();

    }

    Message

    From: Pankaj Tyagi

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 1:38 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    I have tried this also

    But clearing controls after Inserting values is not resolving the problem

    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted

    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 3:03 PM

    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    I think the solution is to simply clear the controls using code in the event of the button save.

    void btnSave_Click(object sender,EventArgs e)

    {

    InsertValues();

    ClearControls();

    }

    I think this is like a work around for this problem.

    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:

    Simple, try this

    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time Hope this helps J

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    Hi Everyone,

    i have a very simple question regarding ASP .net (Using C#)

    i have a data entry form, on save click record gets inserted in databse.

    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this

    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen

    For this, i do not want to put validation on database end How can i do this

    Thanks in advance

    With Regards,
    Pankaj Tyagi

    VCLABS,

    New Delhi, India

    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football

    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    SPNSRED LINKS Programming languages C programming language Computer programming languages
    Java programming language C programming language History of computer programming language

    YAH! GRUPS LINKS

    a Visit your group "Microsofts_C_Sharp" on the web.

    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com

    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

  • No.3 | | 5766 bytes | |

    i understand your proplem and now i will search about a solution
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Cc: tyagi_pankaj_in (AT) hotmail (DOT) com
    Sent: Tuesday, July 05, 2005 4:23 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    i hav attached snapshot of screen in word file with my comments

    if any clarification in needed, then please ask me

    With Regards,
    Pankaj Tyagi
    Message

    From: ahmed
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 6:02 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    can you plz send us a snapshot of this
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:28 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    No i am not writing in PageLoad() event

    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind

    Save button is a Web Server Control

    With Regards,
    Pankaj Tyagi

    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    No, it is not working

    With Regards,
    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 5:17 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    is that working fine with u ?

    what rob64464 (AT) yahoo (DOT) co.uk told u ?

    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:

    why you give this problemalot of of mails

    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer

    don't consume your time.

    If (!IsPostback)

    {

    DoMethodsForFirstTime();

    SecondMethod();

    IntilizeComponent();

    }

    Message

    From: Pankaj Tyagi

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 1:38 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    I have tried this also

    But clearing controls after Inserting values is not resolving the problem

    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted

    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 3:03 PM

    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    I think the solution is to simply clear the controls using code in the event of the button save.

    void btnSave_Click(object sender,EventArgs e)

    {

    InsertValues();

    ClearControls();

    }

    I think this is like a work around for this problem.

    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:

    Simple, try this

    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time. Hope this helps J

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    Hi Everyone,

    i have a very simple question regarding ASP .net (Using C#)

    i have a data entry form, on save click record gets inserted in databse.

    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this

    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen

    For this, i do not want to put validation on database end How can i do this

    Thanks in advance

    With Regards,
    Pankaj Tyagi

    VCLABS,

    New Delhi, India

    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football

    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    SPNSRED LINKS Programming languages C programming language Computer programming languages
    Java programming language C programming language History of computer programming language

    YAH! GRUPS LINKS

    a Visit your group "Microsofts_C_Sharp" on the web.

    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com

    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

  • No.4 | | 6025 bytes | |

    Thanks to all of you for support

    With Regards,
    Pankaj Tyagi
    Message
    From: ahmed
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 7:19 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    i understand your proplem and now i will search about a solution
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Cc: tyagi_pankaj_in (AT) hotmail (DOT) com
    Sent: Tuesday, July 05, 2005 4:23 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    i hav attached snapshot of screen in word file with my comments

    if any clarification in needed, then please ask me

    With Regards,
    Pankaj Tyagi
    Message

    From: ahmed
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 6:02 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    can you plz send us a snapshot of this
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:28 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    No i am not writing in PageLoad() event

    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind

    Save button is a Web Server Control

    With Regards,
    Pankaj Tyagi

    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    No, it is not working

    With Regards,
    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 5:17 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    is that working fine with u ?

    what rob64464 (AT) yahoo (DOT) co.uk told u ?

    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:

    why you give this problemalot of of mails

    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer

    don't consume your time.

    If (!IsPostback)

    {

    DoMethodsForFirstTime();

    SecondMethod();

    IntilizeComponent();

    }

    Message

    From: Pankaj Tyagi

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 1:38 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    I have tried this also

    But clearing controls after Inserting values is not resolving the problem

    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted

    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 3:03 PM

    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    I think the solution is to simply clear the controls using code in the event of the button save.

    void btnSave_Click(object sender,EventArgs e)

    {

    InsertValues();

    ClearControls();

    }

    I think this is like a work around for this problem.

    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:

    Simple, try this

    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time. Hope this helps J

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    Hi Everyone,

    i have a very simple question regarding ASP net (Using C#)

    i have a data entry form, on save click record gets inserted in databse.

    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this

    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen

    For this, i do not want to put validation on database end How can i do this

    Thanks in advance

    With Regards,
    Pankaj Tyagi

    VCLABS,

    New Delhi, India

    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football

    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    SPNSRED LINKS Programming languages C programming language Computer programming languages
    Java programming language C programming language History of computer programming language

    YAH! GRUPS LINKS

    a Visit your group "Microsofts_C_Sharp" on the web.

    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com

    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

  • No.5 | | 6175 bytes | |

    try this

    in the end of the button click handler try to response the page to itself

    if the form named WebForm1.aspx

    so

    private void cmdSave_Click(S sender, System.EventArgs e)

    {

    // Calling method to save Requisition details

    SaveDetails(mstrAction);

    // clearing values from local variables and web controls

    EmptyLocalVariables();

    Reponse.Write("WebForm1.aspx");

    }

    i hope it work with you

    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Cc: tyagi_pankaj_in (AT) hotmail (DOT) com
    Sent: Tuesday, July 05, 2005 4:23 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    i hav attached snapshot of screen in word file with my comments

    if any clarification in needed, then please ask me

    With Regards,
    Pankaj Tyagi
    Message

    From: ahmed
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 6:02 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    can you plz send us a snapshot of this
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:28 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    No i am not writing in PageLoad() event

    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind

    Save button is a Web Server Control

    With Regards,
    Pankaj Tyagi

    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    No, it is not working

    With Regards,
    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 5:17 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    is that working fine with u ?

    what rob64464 (AT) yahoo (DOT) co.uk told u ?

    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:

    why you give this problemalot of of mails

    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer

    don't consume your time.

    If (!IsPostback)

    {

    DoMethodsForFirstTime();

    SecondMethod();

    IntilizeComponent();

    }

    Message

    From: Pankaj Tyagi

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 1:38 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    I have tried this also

    But clearing controls after Inserting values is not resolving the problem

    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted

    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 3:03 PM

    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    I think the solution is to simply clear the controls using code in the event of the button save.

    void btnSave_Click(object sender,EventArgs e)

    {

    InsertValues();

    ClearControls();

    }

    I think this is like a work around for this problem.

    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:

    Simple, try this

    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time. Hope this helps J

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    Hi Everyone,

    i have a very simple question regarding ASP .net (Using C#)

    i have a data entry form, on save click record gets inserted in databse.

    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this

    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen

    For this, i do not want to put validation on database end How can i do this

    Thanks in advance

    With Regards,
    Pankaj Tyagi

    VCLABS,

    New Delhi, India

    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football

    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    SPNSRED LINKS Programming languages C programming language Computer programming languages
    Java programming language C programming language History of computer programming language

    YAH! GRUPS LINKS

    a Visit your group "Microsofts_C_Sharp" on the web.

    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com

    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

  • No.6 | | 6264 bytes | |

    sorry for the last mail it has some mistakes

    the right is :

    try this

    in the end of the button click handler try to Redirect the page to itself

    if the form named WebForm1.aspx

    so

    private void cmdSave_Click(S sender, System.EventArgs e)

    {

    // Calling method to save Requisition details

    SaveDetails(mstrAction);

    // clearing values from local variables and web controls

    EmptyLocalVariables();

    Reponse.Redirect("WebForm1.aspx");

    }

    i hope it work with you

    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Cc: tyagi_pankaj_in (AT) hotmail (DOT) com
    Sent: Tuesday, July 05, 2005 4:23 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    i hav attached snapshot of screen in word file with my comments

    if any clarification in needed, then please ask me

    With Regards,
    Pankaj Tyagi
    Message

    From: ahmed
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 6:02 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    can you plz send us a snapshot of this
    Message
    From: Pankaj Tyagi
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 3:28 PM
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    No i am not writing in PageLoad() event

    Because Inserting Record in database is hapening on click of the save button, so I have to write code in event handler for it in code behind

    Save button is a Web Server Control

    With Regards,
    Pankaj Tyagi

    Message
    From: Rob
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Sent: Tuesday, July 05, 2005 5:47 PM
    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    , Where are you placing this code? This code should be placed inside the PageLoad() Event Handler Method.

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 05 July 2005 12:53
    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com
    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    No, it is not working

    With Regards,
    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 5:17 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    is that working fine with u ?

    what rob64464 (AT) yahoo (DOT) co.uk told u ?

    ahmed <ahmed_mon2003 (AT) hotmail (DOT) comwrote:

    why you give this problemalot of of mails

    i think that <rob64464 (AT) yahoo (DOT) co.ukgive you the right answer

    don't consume your time.

    If (!IsPostback)

    {

    DoMethodsForFirstTime();

    SecondMethod();

    IntilizeComponent();

    }

    Message

    From: Pankaj Tyagi

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 1:38 PM

    Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem

    I have tried this also

    But clearing controls after Inserting values is not resolving the problem

    Because Page refresh (F5), Values are again picked up from ViewState And Record will again inserted

    Pankaj

    Message

    From: realhossam

    To: Microsofts_C_Sharp (AT) yahoogroups (DOT) com

    Sent: Tuesday, July 05, 2005 3:03 PM

    Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem

    I think the solution is to simply clear the controls using code in the event of the button save.

    void btnSave_Click(object sender,EventArgs e)

    {

    InsertValues();

    ClearControls();

    }

    I think this is like a work around for this problem.

    Rob <rob64464 (AT) yahoo (DOT) co.ukwrote:

    Simple, try this

    This is postback(Boolean) will be set to true when a page has executed for the first time and false if its been run for the first time. Hope this helps J

    Kind Regards,
    Robert A Heeley

    http://www.rahsoftware.com

    http://www.lightninghosts.net

    From: Microsofts_C_Sharp (AT) yahoogroups (DOT) com [mailto:Microsofts_C_Sharp (AT) yahoogroups (DOT) com] Behalf Pankaj Tyagi
    Sent: 04 July 2005 14:30
    To: c-sharp-development (AT) yahoogroups (DOT) com; c_sharp_world (AT) yahoogroups (DOT) com; csharp-prog (AT) yahoogroups (DOT) com; dotnet-india (AT) yahoogroups (DOT) com; visual_studio_dot_net (AT) yahoogroups (DOT) com; microsofts_c_sharp (AT) yahoogroups (DOT) com
    Subject: [Microsofts_C_Sharp] Page Refresh Problem
    Importance: High

    Hi Everyone,

    i have a very simple question regarding ASP net (Using C#)

    i have a data entry form, on save click record gets inserted in databse.

    Now if i refresh this page usign F5 or by any other waynew record gets inserted in databse with same values, i want to stop this

    i also want to clear values of all controls on click of save, and if user refresh the page nothing should happen

    For this, i do not want to put validation on database end How can i do this

    Thanks in advance

    With Regards,
    Pankaj Tyagi

    VCLABS,

    New Delhi, India

    size=1 width="100%" align=center
    Yahoo! Sports
    Rekindle the Rivalries. Sign up for Fantasy Football

    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    SPNSRED LINKS Programming languages C programming language Computer programming languages
    Java programming language C programming language History of computer programming language

    YAH! GRUPS LINKS

    a Visit your group "Microsofts_C_Sharp" on the web.

    b To unsubscribe from this group, send an email to:
    Microsofts_C_Sharp-unsubscribe (AT) yahoogroups (DOT) com

    c Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Re: Page Refresh Problem.....


max 4000 letters.
Your nickname that display:
In order to stop the spam: 1 + 1 =
QUESTION ON "Windows"

EMSDN.COM