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??