Home > Archive > ASP .NET > May 2007 > Page Reload
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| general problem 2007-05-31, 7:10 pm |
| Hello All,
I want to Reload the Page, i mean to say when a button is clicked i want to
run the code even written with in the If Not Page.IsPostback then.
Help me how can i do that.
Shiva Kumar
| |
|
| Just redirect back to it?
protected void btnReload(object sender, EventArgs e)
{
Response.Redirect("mypage.aspx");
}
On 31 May, 15:17, general problem <general
prob...@discussions.microsoft.com> wrote:
> Hello All,
>
> I want to Reload the Page, i mean to say when a button is clicked i want to
> run the code even written with in the If Not Page.IsPostback then.
>
> Help me how can i do that.
>
> Shiva Kumar
| |
|
| If the code that runs on the first time the page is loaded is supposed
to also run when the page is posted back, then move the code out of
the if Not Page.IsPostback statement and make it plain drop-thru code
in the Page_Load function.
ie
if not Page.IsPostback then
strText="runs only when page is first loaded and it I want it to
run when page is posted"
strText="I only want this to run when page is loaded"
else
strText="runs only when page is posted"
end if
should be
strText="runs only when page is first loaded and it I want it to run
when page is posted"
if not Page.IsPostback then
strText="I only want this to run when page is loaded"
else
strText="runs only when page is posted"
end if
|
|
|
|
|