By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

Postback problem - datagrid not refreshing

P: n/a
In my Page_load I call a function called ShowUsers if its not a
postback. i.e

if (!Page.IsPostBack) {
ShowUsers();
}

ShowUsers reads a db table, and binds the reader to a datagrid.

On the page I also have some textbox fields - userid, name, email etc,
and a button called SaveUser.

SaveUser_Click is implemented as follows:

if (Page.IsValid) {
db query to add user to table;
confMsg.Text = "User Added Successfully";
ShowUsers();
}

So, when a new user is added, the data should be written to the db and
then the datagrid should be updated, right?

Doesn't happen. I have verified that the new user is in teh db, and the
label is correctly displays a success message. But the datagrid doesn't
refresh.

What am I doing wrong??

Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.