Click here to Skip to main content
15,903,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi every body,

I have web app. that has master page for 2 pages.
One called home page and another called topics page.

When I am inside topics page I want to go to home page so I press on linkbutton have code that :

Server.Transfer("~/HomePage.aspx");

It not go to home page directly but go to Page_Load method of topic page
Why?
Posted
Updated 17-Oct-10 21:45pm
v3
Comments
Dalek Dave 18-Oct-10 3:45am    
Edited for Grammar.

What happens after page load event?

The control must be going to OnClick evetn of the button, isn't it?

Whwnever any event is fired, say for e.g onClick or SelectedIndexChange, the control is first transferd to Pag Load event, and then the actual (OnClick,..,.) event is fired.
 
Share this answer
 
Thank you man, i am understand now.

so, i make that code:

C#
protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {

        }

    }


Thanks.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900