Click here to Skip to main content
15,798,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello guys,I am reallt struck in a very unique condition,I have shown a record saved successfully message in a lable once it is saved successfully in the database then on events like sorting or paging i have done "string.empty" for that lable so that its value gets empty but its not getting null.I appied breakpoint and saw that its values are getting empty but when finally page loads the values of that lable text does'nt changes,it still shows the same messge "Records saved successfully."
I have done every thing possible,applied watch etc etc but can't seem to fine this strange thing,can anyone help me with this.
Updated 21-Apr-11 22:05pm
dan!sh 22-Apr-11 2:29am    
Is it a web based application or a windows based?
[no name] 22-Apr-11 3:05am    
web based application.
fawadparacha 22-Apr-11 2:35am    
can you send the code
Sandeep Mewara 22-Apr-11 2:38am    
label - string.empty - textbox => you have mixed all up. Not sure what and how you are trying to do stuff. Probably posted wrong here.

Further, what does debugging tell you?
[no name] 22-Apr-11 3:06am    
corrected it mate.

1 solution

It's all going to depend on when you do things: If you are expecting something you do as the result of a button press to be persisted across a page load, then you are going to be dissapointed!

1) Value of label in the designer.
2) When you call the Database Insert
3) When you do the sort or paging events.

I think you will find that the record is being inserted more often than you think!
Share this answer
[no name] 22-Apr-11 4:07am    
Mate i have checked every where,the strange thing is i've even tried setting it visible = false but still its showing.
OriginalGriff 22-Apr-11 4:10am    
Where? What method? When is it called? Order of execution is very specific in websites...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900