Page 1 of 1

Newbie question - Add Site (Asp.net)

Posted: Mon Feb 21, 2011 6:07 pm
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

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

Posted: Mon Feb 21, 2011 6:33 pm
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

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

Posted: Tue Feb 22, 2011 2:26 am
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.

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

Posted: Tue Feb 22, 2011 2:29 am
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

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

Posted: Tue Feb 22, 2011 4:23 am
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!