Page Refresh

  • Thread starter Thread starter Prince
  • Start date Start date
P

Prince

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
 
Prince said:
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.
 
Back
Top