hi,i want to create a new folder on my host and place a html file in that folder so that when i typed the name of my website and then that folder it automatically opens that html file, i mean for example i have this url www.maypage.com now i want to make www.mypage.com/newFolder and place test.html in newFolder so that when users type http://www.mypage.com/newFolder in the address bar it automatically opens the test.html fileis there any way? thanks
Check below link
http://msdn2.microsoft.com/en-us/library/8ta62wh3(en-us,VS.80).aspx
Please note when creating a directory, ASPNET user account(windows server 2000) or NETWORK SERVICE (windows 2003) has to have on its PARENT directory read/write permissions.
HC
thanks for your answer but I didn't understand what you said, if possible explain it for me!
You should name the file as "index.html" or "default.html" instead of "test.html"
In IIS, the page a user is directed to when calling a folder is set on the server, Documents tab, called Default Content page. If you do not have access to the properties that way, you can add a default page (index.aspx, default.aspx, index.html, and a few others) to have the user directed to the default pages. If you really need to have your page named differently, you can do this:
1. Create your page "some_filename.htm"
2. Create a Redirect page using one of the default content pages.
2-a: Use a redirect script to point the user at the file "some_filename.htm"
In asp.net, vb, you would use the following code in your default content page.
<script runat="server">Haissam gave you a the CreateDirectory help, should you want to create the directories through your web site instead of manually.
Protected Sub Page_Load(ByVal senderAs Object,ByVal eAs System.EventArgs)
Response.Redirect("some_filename.htm")
End Sub</script>
0 comments:
Post a Comment