Hello brother,
I added an other page called :
Quote:
Default2.aspx
So on button click i will get redirected to Default2.aspx page:
public void clickme(object sender, EventArgs e)
{
Server.Transfer(@"~\Default2.aspx");
}
}
Please note the ~(tilde) and the @ symbol. Think of your project as a file system in UNIX. You need to traverse till that file so that you can access it.
Now i will tell you one more thing, add a link button to your web page:
<asp:LinkButton ID="lb" Text="click" PostBackUrl="~/Default2.aspx" runat="server" />
Observer the
Quote:
PostBackUrl="~/Default2.aspx"
property.
Do you see the path it picks up automatically? if you try the above two codes, you will find that the results are same.
Just try both of them and let me know.
Thanks,
-Rahul