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

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 7372

"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
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
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
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
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
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
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
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
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
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
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
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.