Is there a way to use only Visual Studio for the design of a nop commerce website. I am trying to modify the design through the code i.e. cshtml but i am finding it a little bit hard. Is there like a way that you can modify the pages using the design view of visual studio?
Unfortunately there is not such a designer in Visual Studio. In fact I wonder if there is such a designer at all. Making a tool understand what is written in razor and visualize it would be quite an achievement. For more information on Razor this article is quite good:
Not sure if this will help but - because the page does not render with the old ASP.webform glut (I like webforms but the codeglut was a pain) you can copy the page source and paste it into a new standard asp document. Then making sure you address the css file correctly you can rerun that page manually in VS and get an old asp.net render of your page.
You can then tweak the css file accordingly - while I havent done the next part I am sure it would function:
VS, I believe, does take changes made in the design view and apply them to css rules within the css file automatically (caught me out many a time as that can be a bit buggy) so in theory, you could change the css using that method.
Save the css then rerun the nopcommerce package and new css changes ought to be applied to it - clearly cache etc not with standing.
you can copy the page source and paste it into a new standard asp document.
Just want to say that better is create your own static html markup by using .html document and then update markup in .cshtml files. so you will have the result you want to have :)
What Paul.g is sayiny is actually the same as I said but with a but -
By page source I meant in the browser, right click the page view, then copy the source code out and paste into a new asp or html document in the root folder; so really @paul.g we are saying the same thing!
You will then have a page which renders the same as the site and is linked to the css and javascript files. So, it will reflect css changes you make to your css file immediately, of course the classes used are easily viewable to so you will get a better view of how much of the 'site' hangs together ....
There actually is, if you are using Visual Studio 2012 RC. They have added a feature called Page Inspector. This behaves very similar to the Web Developer Tool in IE, but way better! As you walk through your site and select different elements, it will also open the view or other file that is being used to create what you clicked on. Here is information on how to use the Page Inspector http://www.asp.net/mvc/tutorials/mvc-4/using-page-inspector-in-aspnet-mvc.
Along with that, I have tried to use it on the no_source version of nopCommerce v2.6 and it does not open the corresponding views for me. I'm not sure if this is because it's compiled or not. You may have to use the source version of nop to get that feature to work correctly.
Now that sounds really promising. Yep - I have VS2012r - til jan013 when it 'ends' - and did glance at the page inspector but haven't explored it - yet...
Thanks for the tip, nice one.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.