I'm just starting to go through the tutorial and on the very first one I type all the html they say, hit run but it comes up with the localhost in the address bar without the default.html. If I go ahead and type default.html, the page appears as it should.
Have no idea why this should not work. Thanks!
thats because VS compiled and displays .aspx pages (not the HTML pages)
Try right click on your .html page, and select 'Set As Start Page' in solution explorer (make sure the project is not running)
That's the problem I'm having. It's not displaying. I went back and watched the video all the way through again and didn't spot anything I did wrong. The only thing that didn't look right was the .cs document didn't have anything between the {} like it did
in the video. (The only modification I had to make following along with the video was in the html file.
Click on the Site button (bottom left) and then Settings. Check to see if Default.html is in the list of default pages. If it isn't, add it.
Also, just check the video or tutorial again and make sure that the file extension actually is html rather than htm. Default.htm is definitely in the list of default pages.
You were correct in that Default.html was not in the list. Curiously, it was listed in the web.config file if that makes any difference. Regardless, I added it and got the same result. I went back and checked the video and verified that they listed default.html
as the file to use. Also, to be sure, I re-downloaded WebMatrix as it had been quite a while since I had originally downloaded it.
On an unrelated issue, one thing that's slightly irritating about WM is that when you change a file, the "Save File" icons do not offer you a chance to save. I think it does actually save it when you press run but I'm used to hitting save as soon as I make
a change. But on this original problem, I'm stumped.
WebernGuy
Member
30 Points
15 Posts
Default.html not appearing in address bar
Mar 10, 2012 01:26 PM|LINK
Hello,
I'm just starting to go through the tutorial and on the very first one I type all the html they say, hit run but it comes up with the localhost in the address bar without the default.html. If I go ahead and type default.html, the page appears as it should. Have no idea why this should not work. Thanks!
usman400
Contributor
3503 Points
721 Posts
Re: Default.html not appearing in address bar
Mar 10, 2012 01:29 PM|LINK
thats because VS compiled and displays .aspx pages (not the HTML pages)
Try right click on your .html page, and select 'Set As Start Page' in solution explorer (make sure the project is not running)
then re-run by pressing F5
WebernGuy
Member
30 Points
15 Posts
Re: Default.html not appearing in address bar
Mar 10, 2012 01:32 PM|LINK
I'm sorry if there was a misunderstanding, I'm not using VS, I'm using WebMatrix.
usman400
Contributor
3503 Points
721 Posts
Re: Default.html not appearing in address bar
Mar 10, 2012 01:38 PM|LINK
Go on, find the option to set it as startup page
I suppose u can follow the same steps to do that !
Mikesdotnett...
All-Star
154927 Points
19867 Posts
Moderator
MVP
Re: Default.html not appearing in address bar
Mar 10, 2012 05:56 PM|LINK
Default,html is one of the default documents. They are automatically displayed if the domain only is requested eg http://localhost:1234/
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Mikesdotnett...
All-Star
154927 Points
19867 Posts
Moderator
MVP
Re: Default.html not appearing in address bar
Mar 10, 2012 05:57 PM|LINK
That's not correct at all.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
WebernGuy
Member
30 Points
15 Posts
Re: Default.html not appearing in address bar
Mar 10, 2012 06:00 PM|LINK
That's the problem I'm having. It's not displaying. I went back and watched the video all the way through again and didn't spot anything I did wrong. The only thing that didn't look right was the .cs document didn't have anything between the {} like it did in the video. (The only modification I had to make following along with the video was in the html file.
Mikesdotnett...
All-Star
154927 Points
19867 Posts
Moderator
MVP
Re: Default.html not appearing in address bar
Mar 10, 2012 07:38 PM|LINK
Click on the Site button (bottom left) and then Settings. Check to see if Default.html is in the list of default pages. If it isn't, add it.
Also, just check the video or tutorial again and make sure that the file extension actually is html rather than htm. Default.htm is definitely in the list of default pages.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
WebernGuy
Member
30 Points
15 Posts
Re: Default.html not appearing in address bar
Mar 12, 2012 09:04 PM|LINK
Hi Mike,
You were correct in that Default.html was not in the list. Curiously, it was listed in the web.config file if that makes any difference. Regardless, I added it and got the same result. I went back and checked the video and verified that they listed default.html as the file to use. Also, to be sure, I re-downloaded WebMatrix as it had been quite a while since I had originally downloaded it.
On an unrelated issue, one thing that's slightly irritating about WM is that when you change a file, the "Save File" icons do not offer you a chance to save. I think it does actually save it when you press run but I'm used to hitting save as soon as I make a change. But on this original problem, I'm stumped.
Thanks for your help.
Mikesdotnett...
All-Star
154927 Points
19867 Posts
Moderator
MVP
Re: Default.html not appearing in address bar
Mar 13, 2012 06:40 AM|LINK
Have you got an Index.cshtml or default.cshtml file in your site? If so, rename or remove them. They kick in before the default pages.
On the related issue, the Save icon is right at the top in the title bar. Odd place to put it, but I always use Ctrl + S anyway.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter