When using asp.net web forms you can create a Default.aspx page, in the Page_Load
method in the Default.aspx.cs
file call this:
private void Page_Load(object sender, EventArgs e)
{
Response.Redirect("~/test/index.html");
}
题
I want to redirect url to my site. I mean I have this domain.
www.samplesite.com
and I have this site : www.samplesite.com/test/index.aspx but I want to enter www.samplesite.com and goes to my site. How can I do that?
I use dot net ,4.5 framework.
解决方案
When using asp.net web forms you can create a Default.aspx page, in the Page_Load
method in the Default.aspx.cs
file call this:
private void Page_Load(object sender, EventArgs e)
{
Response.Redirect("~/test/index.html");
}