Dev Express MVC Extensions with Razor - Controls Show as Lists - asp.net-mvc-3

Any DevExpress control I use, just renders a list. I’ve tried all 3 possible syntaxes (listed on the site below) and every time, the control I want to use (TreeView, NavBar, etc.) just renders as a bulleted list. Any ideas why? I’ve checked Google and the DevExpress support center, but I can’t find any issues like this.
DevExpress with razor guide: http://documentation.devexpress.com/#AspNet/CustomDocument9944
I just put this code on my index page to test that DevExpress is working:
#{Html.DevExpress().NavBar(settings => {
settings.Name = "myNavBar";
settings.Groups.Add("Group1").Items.Add("Item1-1");
settings.Groups.Add("Group2").Items.Add("Item2-1");
settings.Groups.FindByText("Group2").Expanded = false;
}).Render();}
When it reaches the page, it just shows a bulleted list:
Group1
Item1-1
Group2
Any ideas what's causing this?

The project I was working on was being rendered inside another project. I just needed to get rid of my project's layout and add using statements to the cshtml pages:
#using DevExpress.Web.Mvc.UI;
#using DevExpress.Web.Mvc;
The only problem I still have, is the scriptlet code gets highlighted red (but it builds/works fine and has intellisense).

It seems that any required DevExpress' entry is not registered within the MasterPage (_Layout.cshtml) / Web.config http://help.devexpress.com/#AspNet/CustomDocument8163. I suggest that you use specially designed Visual Studio Project Templates http://help.devexpress.com/#AspNet/CustomDocument9145 to avoid missing any required DevExpress' entry.

Related

Load razor pages with layout without refreshing entire page

I just created a net6.0 Razor Pages project in Visual Studio 2022. I haven't made any changes to it at all.
The layout is the standard file that gets created. Using a nav bar with links to Home/Index and Privacy. I plan on adding a side bar for navigation as well.
All I want to do is, while using _Layout.cshtml, load pages from my nav links (ex: Index, Privacy, etc...) without reloading/refreshing the entire page. I just want to update the main content without reloading everything.
I've been searching online for a few hours and I just can't find what I'm looking for. I'm not sure where to start :(
There is no way without JavaScript. Try SignalR and JavaScript for Razor Pages

In Visual Studio 2010, how can I edit the content of an aspx page with master page in design view?

I've noticed that whenever I add a new asp.net with a master page to a project, I am unable to edit it in the design view. I am able to see the master page content and an element that says ; however, I am unable to edit the content. I'd like to drop things in there and adjust their properties but I am unable to access them in the design view. How can I accomplish this?
Thanks!
I am ignorant. For anyone who has the same problem, be sure that your content is not wrapped inside a user control. I did some testing and found that was the problem.

Telerik problems with IntelliSense and Templates

I am working on the project where I use Telerik MVC controls in order to show some NumericTextBoxes and other controls. I have two problems that are maybe related.
1/ IntelliSense works fine in Views/Shared and in some Views. But in some it doesn´t work. The code is absolutely similar without specific blocks of code. I try to add all Telerik namespaces to Web.Config in Views folder, but it doesn´t work. Just in Views/Shared is IntelliSense working.
2/ I would like to use [SourceCodeFile] attribute in my Controller in order to using NumericTextBoxes templates. But VS says "Unknown attribute" and "Resolve" is not in context menu. I was trying to add all Telerik namespaces but it still doesn´t work.
Some suggestions?

Adding HTML5 markup to a MVC3 site

I have already created a MVC3 site but when I did I didn't select the HTML5 markup option. I would like to add some 'safe' HTML5 markup into the MVC3 site unless there is a way to convert the project to use HTML as if I had selected it from the start (is that possible?).
Would I be safe changing the _layout.cshtml to use HTML5 markup such as nav? How do I use my current CSS style sheet to make sure it positions it correctly (is it as simple as adding the class)?
I understand you can select the 'Target Schema For Validation' option to HTML5. Is that mainly for intellisense? Is this one of the primary bi-products of selecting the HTML5 option at project creation time or are there many more impacts other then this target schema and the _layout page?
Thanks much in advance!
There is no magic to the HTML5 support in MVC3. The checkbox in the project template dialog simply creates a different _layout file with <nav> instead of <div>, a reference to modernizr.js, etc. You're free to change the markup of the _layout file to whatever you like.
The schema validation dropdown simply governs what code completion options you get from Intellisense, and what warnings you get when adding markup that does not conform to the schema. But again, if the HTML5 standard gets updated with new tag next week, and Microsoft fails to update Visual Studio, you're free to add markup that doesn't conform to the VS schema.

class name and method name dropdown list is missing (visual studio setting)

Does anyone know how to get my class name and method name dropdown lists again? It's the dropdown lists that are usually above the code. It's just a setting but i can't seem to find it. I don't want to reset my setting btw. I shouldn't have to.
Tools-->Options...
Text Editor-->All Languages
Check "Navigation Bar."
(Picture is from VS2013)
Tools - Options - Text Editor - (choose the type of file - C#, html, etc) - General
In the bottom section of the form (The "Display" area) make sure that "Navigation Bar" is checked.
Actually there is a bug in VS2013, where if you place VS on the monitor on the left side, and this is not your primary monitor, then the dropdowns will not work.
I came here searching for a solution for javascript/node.js specifically (in VS 2013). Only by doing further search I found out that this feature has been removed (from RC) due to stability/performance reasoning and is not available anymore.
https://connect.microsoft.com/VisualStudio/feedback/details/806325/javascript-navigation-bars-are-missing-after-upgrading-from-vs2013-pro-rc-to-rtm
Also, I did not see this added again through either node tools or web essentials.
In VS2015 I just had to toggle this setting off then back on again to get the navigation bar back.
If you want a list of javascript functions that works similar to the navigation bar in the VB or C# pages then search for the extension inside Tools > Extensions and Updates...
Javascript Map Parser
You have to add in aspx into the pages is parses but it's exactly what I needed to quickly find functions in a big section of Javascript I had.
Make sure you in code behind file.
In my case I was looking at code (VB) server side code inside .aspx page, and the dropdown only for code behind files (.aspx.vb or aspx.cs)

Resources