How to open .cshtml in designer view? - view

I am trying to design a view using asp.net mvc 3 RC. I am not sure but I am not able to open my cshtml files in designer mode. I can just change their source html but no design time assistance is there.
Am I missing something ?

In this version the CSHTML editor does not support a designer view. Sorry.

Related

.NET Core can't add Razor pages

As you can see with the images above when I go to add a new razor page instead of taking me to the razor page prompt it instead takes me to add new item and doesn't let me add a razor page. Does anyone know why this is caused? I also need to use an empty razor page for this project.
You have to make sure you have the "ASP.NET and web development" workload installed within Visual Studio.
In Visual Studio go to Tools -> Get Tools and Features...
and make sure "ASP.NET and web development" is ticked and then click Modify / Install.
I had the exact same problem and managed to fix it by following the above steps.

Kendo ASP MVC cshtml automatic code formatting?

I usually use Ctrl+k, Ctrl+d to format my code in Visual Studio 2013, but with the Kendo UI controls in cshtml file, it does not work. Any workaround for this?
Please verify that the kendo.web.min.intellisense.js file is present in the folder which hosts kendo.web.min.js
Explanation can be found here: http://docs.telerik.com/kendo-ui/vs-intellisense
In case , you can't find the intellisense files, search them in vsdoc file in the Kendo installation. then copy them into the project folder with kendo.web.min.js
That should solve the issue.

How to configure Visual Studio (2010) to open aspx pages on code behind by default on double click?

The question says it all... its pretty simple, and it can be done by selecting the file and pressing F7 but I'm always double clicking accidentally and visual studio takes forever to open the design view page (even if its almost empty), but I just wanna go straight to the code.
Any tips?
I had this problem too. My solution was to change Visual Studio to open up pages in HTML view by default. Because VS doesn't need to format the page, this is MUCH quicker. You can see how to get Visual Studio to open pages in HTML view at http://www.wiseowl.co.uk/blog/s153/visual-studio-html-view.htm.
To tell Visual Studio 2010 to open files automatically in Source view,
Tools -> Options
Select the General section of the HTML Designer tab.
Choose to start pages in Source View.
Just incase Andy's link dies, the method to make Visual Studio open ASPX pages in HTML view rather than the default designer view:
Go to Tools -> Options. Select HTML Designer from the menu at left. Select "HTML View" for HTML pages, Active Server Pages and Web Form pages. Click OK.
This forces VS to open pages in HTML view, which for developers is usually the view we work in for editing ASPX templates. In addition, it addresses the original issue of this question, which is getting VS to open pages faster, since it doesn't have to render a designer view.
I think you are asking to configure VS2010 to take you to the .cs / .vb file when you double click on the aspx page, but you could also be asking about make it go to the html source view.
If you are wondering about the latter (html source view), here is a screenshot of what setting to change.
http://screencast.com/t/8UluCEUQr
I hope this helps.

Design View on SharePoint Project Visual Studio 2010

Hi I am creating an application page for SharePoint 2010
But i ran into a little issue.
First I create a Empty SharePoint Project then I added an Application Page item to the project
When i tried to add controls i am only capable of doing so in the Source View
Some one knows how to enable the design view for this type of project?
Thanks in advance.
Design view may not available for SharePoint Developers in VS.NET because NOT all dependencies (and most importantly master page and other scripts, styles used by master page) are not available to VS.NET's project environment. So VS.NET may not be able to render the page correctly.
The Design view of the designer is disabled for application pages.
You can only design the page in the Source view of the designer.
See
http://msdn.microsoft.com/en-us/library/ee231581.aspx
here is a trick for this little problem:
add a user control to your project. copy all the markup code over to this user control. design away, then copy the markup back into your application page to start refining your code to work as a sharepoint item.

When developing a MVC project, is the the toolbox really useful?

I'm a noobie when it comes to VS, specifically VS 2010. I'm trying to learn MVC 2.0. If you're developing a pure MVC project, it seems like most of the toolbox is not useful. Shouldn't the IDE hide controls that aren't useful? Specifically, I'm looking at the AJAX extensions like Timer and UpdatePanel, but it seems like a lot controls more would require postback.
alt text http://www.freeimagehosting.net/uploads/6c63317805.jpg
You are correct.
The ASP.NET WebForms controls in the Toolbox are pretty useless during ASP.NET MVC development. While it may be pinned by default, you can choose to hide it from the 'View' menu.

Resources