473,396 Members | 1,924 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,396 software developers and data experts.

Refreshing a page after data is updated

I have a form that postsback to the server to update a DB table A. In this
form I have a repeater that is populated from DB table B.

Within this form, I have another button that, when clicked, will update DB
table B.

The problem I am having is that when this button is clicked, the following
happens:

Postback
OnPageLoad (binds data to the repeater)
Button_click (adds new item to the DB table B)

As you can see, the problem is that on postback, even though the table is
updated, the page isn't reflecting that because the data was bound prior to
the button_click function being excecuted.

No, normally I'd just put a response.redirect in the button click function
to reload the page after the data is inserted into the table. However, in
this case, I don't want that, as I want to preserve any edited fields in the
parent form...so I need to preserve the postback.

The one thought I have is instead of putting the update DB function within
the button_click function is to instead put it in the page_load BEFORE I
call the function to bind data to the repeater. However, I'm not sure what I
could check for there to see if that particular button was clicked. Any
thoughts?

-Darrel
Nov 19 '05 #1
1 1119
> I don't want that, as I want to preserve any edited fields in the
parent form...so I need to preserve the postback.


Which got me thinking...can I pass the postback data back via a querystring?
Or is there a way to trigger a postback from the codebehind (something like
response.postback(thispage))?

-Darrel
Nov 19 '05 #2

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

Similar topics

2
by: James Evans | last post by:
I am having some problems with my vb.net\asp.net\sql 2000 app. Two web forms. All stored procs for data access. One form does inserts and delets - no problems. The other form does the updates. The...
31
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and...
2
by: Ben | last post by:
Hi, One ASP.NET transactional page conducts a long transaction in a button click function. I want to display the transaction progress info in label control without refreshing page. It is...
0
by: ravi | last post by:
Hi, I am getting problem on refreshing page, when i close child window ..here i am not using button to close window just clicking on top of the page above cross singn to close window .
0
by: bbsbob | last post by:
I've created a main page that contains a coupe of iframes, i.e. main.aspx contains 1.aspx and 2.aspx from 2 iframes. How could I use code behind to get page data from both 1.aspx and 2.aspx? For...
5
by: Richard | last post by:
I tried embedding this in an XHTML file, then changed it to a last4.php, but get a syntax error. What am I doing wrong? <?php $last_modified = filemtime("last4.php"); print("Page Last...
7
by: raknin | last post by:
I'm using AJAX on my website, but internet explorer does not seem to actually be refreshing the data I retrieve via AJAX when I refresh the page. For example, I have a button that when pressed uses...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why is my AJAX page not updated properly when using an HTTP GET request in Internet Explorer?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.