i hv problem in gridview. In gridview i have two template field.
in one template field there is label which showing questions stored in databse. and other template field contains Textbox. i want to store the value entered in the textbox but there is problem when i tried to stored the question and the value entered in the textbox in another table...it only storing the question displayed on the label not the value stored in the textbox.
try to solve my problem...............
Thanks
Problem In Gridview
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

CrishRank #1,487 · 1.1K reputationPosted May 14, 2010, 5:16 AM EDT
I think your gridview is refreshed when you tried for saving data.
Please write (!Page.IsPostback) in page load event then bind GridView.
thanks
Don't forget to Mark Do you like this Answer that solved your problem!
Deepak Pandey71 reputationPosted May 14, 2010, 6:32 AM EDT
fro the answer.........
u r right the page is refresed when i clicked on submit button and every time textbox got erased it stores nothing........
for that i hv to use if(!ispostback) .......
this was the my mistake.........
thanks again for ur support...........
Deepak
CrishRank #1,487 · 1.1K reputationPosted May 14, 2010, 10:09 AM EDT
wc
thanks