Yeah, Sorry I replied to the first email about it not working. So I did not read the rest of the emails been sent.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Pankaj Tyagi
Sent: 05 July 2005 13:29
To: [email protected]
Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem.....
Importance: High

 

No  i am not writing in OnPageLoad() 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

 

 

----- Original Message -----

From: Rob

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

Subject: RE: [Microsofts_C_Sharp] Page Refresh Problem.....

 

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

 


From: [email protected] [mailto:[email protected]] On Behalf Of Pankaj Tyagi
Sent: 05 July 2005 12:53
To: [email protected]
Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem.....
Importance: High

 

No, it is not working...

 

With Regards,
Pankaj

----- Original Message -----

From: realhossam

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

Subject: Re: [Microsofts_C_Sharp] Page Refresh Problem.....

 

is that working fine with u ??

what [EMAIL PROTECTED] told u ??

ahmed <[EMAIL PROTECTED]> wrote:

why you give this problemalot of of mails

i think that  <[EMAIL PROTECTED]> give you the right answer

don't consume your time.

 

·  If (!IsPostback)

·  {

·              DoMethodsForFirstTime();

·              SecondMethod();

·              IntilizeComponent();

· 

·  }

 

 

 

----- Original Message -----

From: Pankaj Tyagi

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 On Page refresh (F5), Values are again picked up from ViewState... And Record will again inserted ...

 

Pankaj

 

----- Original Message -----

From: realhossam

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 <[EMAIL PROTECTED]> wrote:

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

 


From: [email protected] [mailto:[email protected]] On Behalf Of Pankaj Tyagi
Sent: 04 July 2005 14:30
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [email protected]
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 way...new 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

 

 

 

 

 

 

<HRsize=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

 



YAHOO! GROUPS LINKS




Reply via email to