Something like this (if you need more information)
if (!IsPostBack)
{
'Bind your GridView
}
Main Topics
Browse All TopicsHi All,
I am developing an shopping list Application with the items displayed in a grid view. There are two columns at the end which are template fields, one contains a textbox calles txtQuanity and the other contains a button called btnAdd.
Onclick i need to be able to add the details of the row and the quantity from the text box to a table in the database. However the gridview columns have filters which need the postback event to rebind the GV but when this happens the value entered in the textbox is lost so the quantity is "". how can i save the value before the page is reloaded???
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I have to rebind the gridview because i have filter dropdowns which are linked columns in the gridview. The columns are populated with a distinct query based on the populate gridview query so to select a value from the dropdown fllter it needs to rebuild the gridview and the dropdown lists which is why it needs a postback to trigger the rowbounds event in the gridview. unless there is a way to do this without a postback?
Business Accounts
Answer for Membership
by: prairiedogPosted on 2008-05-19 at 08:16:20ID: 21598511
Check you Page_Load event handler.
You need to have a IsPostBack block to make sure that the GridView will not be rebound upon postbacks.