Newbie question - Add Site (Asp.net)

TopStyle has been discontinued and support is no longer available. The forum is read-only. NOTE: TopStyle was not developed by the makers of CSS HTML Validator.
vjust
Rank 0 - Newcomer
Posts: 3
Joined: Mon Feb 21, 2011 6:02 pm

Newbie question - Add Site (Asp.net)

Post by vjust »

Hi,

Pardon me if I am missing something obvious.

Under "File" I see a menu option to "New Site" - and "Open Site". If I have an ASP.NET site, will this show in the preview window inside TopStyle. I want to be able to edit a .CSS file (part of my asp.net MVC site) and have it update the preview (the bottom window in my layout).

thanks

vj
vjust
Rank 0 - Newcomer
Posts: 3
Joined: Mon Feb 21, 2011 6:02 pm

Re: Newbie question - Add Site (Asp.net)

Post by vjust »

Sorry to jumpin again - I found where I had to set the mapping.. Issue is that I am using MVC, and MVC uses 'simple' URLs - so a pathname of c:\inetput\wwwroot\mysite\views\home\index.aspx will map to http://localhost/mysite.

Net effect is I see a 404 error in my TopStyle preview window. The Preview URL has the value "http://localhost/mysite/views/Home/index.aspx" - so the webserver returns a 404. [ The correct url is http://localhost/mysite ]

thanks
User avatar
TopStyle Support
Rank VI - Professional
Posts: 506
Joined: Sat Jun 13, 2009 12:38 pm

Re: Newbie question - Add Site (Asp.net)

Post by TopStyle Support »

vjust wrote: Under "File" I see a menu option to "New Site" - and "Open Site". If I have an ASP.NET site, will this show in the preview window inside TopStyle. I want to be able to edit a .CSS file (part of my asp.net MVC site) and have it update the preview (the bottom window in my layout).
You do not necessarily have to create a TopStyle site. Simply open the CSS document you would like to edit, and then change the "preview files" drop-down in the output preview pane to whatever HTML document you would like to preview. Then when you change the CSS document, it should update the preview automatically.
User avatar
TopStyle Support
Rank VI - Professional
Posts: 506
Joined: Sat Jun 13, 2009 12:38 pm

Re: Newbie question - Add Site (Asp.net)

Post by TopStyle Support »

vjust wrote:Sorry to jumpin again - I found where I had to set the mapping.. Issue is that I am using MVC, and MVC uses 'simple' URLs - so a pathname of c:\inetput\wwwroot\mysite\views\home\index.aspx will map to http://localhost/mysite.

Net effect is I see a 404 error in my TopStyle preview window. The Preview URL has the value "http://localhost/mysite/views/Home/index.aspx" - so the webserver returns a 404. [ The correct url is http://localhost/mysite ]
Sounds like you need to map this local directory:

c:\inetput\wwwroot\mysite\views\home

to this URL:

http://localhost/mysite
vjust
Rank 0 - Newcomer
Posts: 3
Joined: Mon Feb 21, 2011 6:02 pm

Re: Newbie question - Add Site (Asp.net)

Post by vjust »

I found a way out by doing these steps in the Preview "Options" dialog.

1. Disabled URL mapping
2. Added my 'custom' URLs, such as http://localhost/mysite/home, http://localhost/mysite/goals etc. to the list of preview URLs.
3. Change the "preview files" dropdown in the output preview pane to the relevant URL.

Works well for me.

thanks!