473,503 Members | 1,625 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page Refresh

How can I refresh a page from the code behind pages? I
know Server.Transfer("<same page>") works. However, I am
refreshing a page from a Button within a user control
which has it's own code behind page.

I don't know the name of the page of the user control.
Within the user control code behind, I'm looking for
something like,

this.Parent.Parent.Refresh();

help anyone?

--Prince
Nov 18 '05 #1
3 7381

"Prince" <pr******@cox.net> wrote in message
news:11****************************@phx.gbl...
How can I refresh a page from the code behind pages? I
know Server.Transfer("<same page>") works. However, I am
refreshing a page from a Button within a user control
which has it's own code behind page.

I don't know the name of the page of the user control.
Within the user control code behind, I'm looking for
something like,

this.Parent.Parent.Refresh();


You have to remember that asp.net attempts to change the model of ASP
applications a little bit. If you are clicking "RUNAT=Server" controls, you
already are refreshing the page, in the sense that the page is reloaded
after posting back data to the server and firing whatever events you have
wired up to any user controls. It isn't the lack of refresh that is
maintaining the appearance and state of your page, it is the fact that
asp.net pages preserve the ViewState by default.

What you'd be better off doing is attaching the specific actions (that you
associate with refresh and that you want to have happen) to the button
control you plan to add.

R.
Nov 18 '05 #2
You can attach a javascript to the button to reload the page.

"Richard K Bethell" <so*****@spammingisevil.bad> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...

"Prince" <pr******@cox.net> wrote in message
news:11****************************@phx.gbl...
How can I refresh a page from the code behind pages? I
know Server.Transfer("<same page>") works. However, I am
refreshing a page from a Button within a user control
which has it's own code behind page.

I don't know the name of the page of the user control.
Within the user control code behind, I'm looking for
something like,

this.Parent.Parent.Refresh();
You have to remember that asp.net attempts to change the model of ASP
applications a little bit. If you are clicking "RUNAT=Server" controls,

you already are refreshing the page, in the sense that the page is reloaded
after posting back data to the server and firing whatever events you have
wired up to any user controls. It isn't the lack of refresh that is
maintaining the appearance and state of your page, it is the fact that
asp.net pages preserve the ViewState by default.

What you'd be better off doing is attaching the specific actions (that you
associate with refresh and that you want to have happen) to the button
control you plan to add.

R.

Nov 18 '05 #3
thanks, I'll try both.
-----Original Message-----
You can attach a javascript to the button to reload the page.
"Richard K Bethell" <so*****@spammingisevil.bad> wrote in messagenews:uR**************@TK2MSFTNGP12.phx.gbl...

"Prince" <pr******@cox.net> wrote in message
news:11****************************@phx.gbl...
> How can I refresh a page from the code behind pages? I > know Server.Transfer("<same page>") works. However, I am > refreshing a page from a Button within a user control
> which has it's own code behind page.
>
> I don't know the name of the page of the user control. > Within the user control code behind, I'm looking for
> something like,
>
> this.Parent.Parent.Refresh();
You have to remember that asp.net attempts to change the model of ASP applications a little bit. If you are clicking "RUNAT=Server" controls,you
already are refreshing the page, in the sense that the

page is reloaded after posting back data to the server and firing whatever events you have wired up to any user controls. It isn't the lack of refresh that is maintaining the appearance and state of your page, it is the fact that asp.net pages preserve the ViewState by default.

What you'd be better off doing is attaching the specific actions (that you associate with refresh and that you want to have happen) to the button control you plan to add.

R.

.

Nov 18 '05 #4

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

Similar topics

3
12886
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
1
34283
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like...
37
12690
by: ajay | last post by:
How to make a web page getting refreshed after a given time interval automatically. HTML Code plz. Tx Ajay
18
10110
by: Alan Z. Scharf | last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want the page to refresh at the end of each callback to display A. Results of a SQLServer query showing cumulative running...
4
1831
by: Mike | last post by:
On my web app I allow the user to enable or disable the refreshing of the page. I notcied that if the browser window is minimized the page does not refresh, or if it sits a long time without any...
9
7705
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
10
23382
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application and I need to find a way to cause a page refresh from within my application. Does anyone know how to force the browser to refresh the current page? ...
10
32827
by: phforum | last post by:
Hi, I wrote a PHP page for user input the information to search the database. And the database data will update every second. I want to set the auto refresh to get the data from database every...
4
5041
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...
5
3732
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, I used the following code to refresh the parent page, and it works very well (Thanks to Peter Bromberg "). Response.Write("<script language='javascript' type='text/javascript'{...
0
7188
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
7258
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,...
1
6970
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
7441
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...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.