Page Refresh

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
 
R

Richard K Bethell

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top