473,322 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Postback problem - datagrid not refreshing

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
0 931

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: msnews | last post by:
Hi -- I'm very, very new to ASP.Net, and I've been trying for several days to figure out how to update a datagrid AND refresh it on the client side so that the page doesn't refresh. I've torn my...
1
by: Rhys | last post by:
I have a page which has an IFrame on it. The src of the IFrame is a page with a datagrid on it. The Datagrid has bound template columns. The columns of the datagrid pass the bound data value of...
10
by: Krista Lemieux | last post by:
I'm new to ASP.NET and I'm not use to the way things are handled with this technology. I've been told that when I have a control, I should only bind the data to it once, and not on each post back...
1
by: wh1974 | last post by:
I'm not sure if i'm heading in the right direction so would appreciate any comments on what I'm trying to do. Basically I have a DataGrid on a page which has columns whose width's I set in the...
5
by: Jeronimo Bertran | last post by:
I have a DataGrid that gets filled based on a filter which is defined by the values that the user selects on several controls. When the page postbacks after changing the selection on the filter...
9
by: John Walker | last post by:
Hi, I have a datagrid with a radiobutton template column, with AutoPostBack set to TRUE. When the user clicks on a radiobutton the application will PostBack, and in the PostBack there will be...
6
by: SkeanDu | last post by:
Ok, here is my problem. I have an aspx page that displays a databound datagrid and in one of the datagrid column headers I have an image that when clicked opens up a modal web dialog (another...
13
by: Alex D. | last post by:
Recently I realized the Wachovia bank switched to asp.net pages. I like very much the way they did it and I would like to know how they managed to do the postbacks and the blinking between...
4
by: Dan | last post by:
Hi, i'm not sure to understand the difference between refreshing the pagina by clicking on 'refresh' in the browser and a postback. What i think it is: Suppose a page with a form containing a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.