469,623 Members | 1,505 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

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 7136

"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Scott | last post: by
1 post views Thread by Lew | last post: by
18 posts views Thread by Alan Z. Scharf | last post: by
4 posts views Thread by Mike | last post: by
9 posts views Thread by PK9 | last post: by
10 posts views Thread by Fred Nelson | last post: by
5 posts views Thread by =?Utf-8?B?Sm9obg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.