Why I get a "Active schema does not support the element"? - visual-studio-2003

I'm working with Visual Studio 2003 and ultra grid.
In my html code I can see tag error like
active schema does not support the element...
However, I don't see any problem to execute my web application. I just wanted to know why I am getting Tag error. Is it because of third party tool ultrgrid?

The visual studio designer has its own HTML schema validator. You may see HTML validation errors in design mode eventhough the website works fine.
It could be that Infragistics assemblies are loading from the GAC and not the "bin" directory of the website.
Make sure that your references to the Infragistics assemblies are set to "Copy Local". Please refer to this article for more information.

The IDE validates your HTML to a schema - see here.
You could try to put valid HTML (if its not) or add a schema to use (details here).

Related

Web API Help Pages not loading documentation XML

I'm trying to set up the ASP.NET Help Pages to run in an existing MVC project, though pointing towards the documentation file from a Web API project in the same solution. Convention has the Help Pages running inside the Web API that it's documenting but in this case I want it in a sibling MVC project.
The Web API project outputs its documentation XML file in a folder within the MVC project.
I've installed the Microsoft.AspNet.WebApi.HelpPage NuGet package in the MVC project. This creates a class \Areas\HelpPage\App_Start\HelpPageConfig.cs, and within this class's Register method I've passed the XmlDocumentationProvider the path to the Web API's documentation file.
But when I load the page, it's empty, aside from a title and a placeholder description.
Upon debugging the HelpController.Index method, I can see in the returned IApiExplorer that the _apiDescriptions are empty.
However, if I install the Help Pages directly into the Web API project and debug the same method, I can see that the _apiDescriptions are now present.
Can anyone explain what the Web API project is doing or has configured which the MVC project isn't doing or hasn't configured?
Just set this up myself, and I think I ran into a similar issue, if i'm reading what you're saying correctly.
Try the following:
Go to Areas\HelpPage\App_Start\HelpPageConfig.cs. Around line 36, you'll want to make sure you uncommented the line as below:
//// Uncomment the following to use the documentation from XML documentation file.
config.SetDocumentationProvider(new XmlDocumentationProvider(HttpContext.Current.Server.MapPath("~/App_Data/ApiDocumentation.xml")));
And make sure the path is correct. I happened to put my xml file in the App_Data directory.
Go to Project=>Properties=>Build. Under Output, make sure the "XML documentation file" box is checked, and point it to App_Data\ApiDocumentation.XML (assuming you put it in the same place i did above.
If i remember correctly, i had to make sure i added the .xml file to the project- i had some problems when i tried publishing it to our test server at work and it said the file couldn't be found. After you build, simply go to App_Data, right click on the folder, and add existing item. navigate to App_Data in your file system and select the xml file.
This will hopefully fix your problem!
I'm not sure if this will help anyone else that stumbles across this, I had started with a blank template from VS and added the help files via the Nuget package.
Because it was a blank template and I had no areas set up, it was missing the following from the global.asax
AreaRegistration.RegisterAllAreas();
This prevented the HelpPageConfig.Register from being called and thus, the Xml Documentation provider was never set.

Using the razor engine in SharePoint 2013 Visual Web Part

I'm trying to make use of the razor engine in a SharePoint 2013 Web Part. This, I read, shouldn't be too difficult since SharePoint 2013 Visual Web Parts can be built using .NET Framework 4.0
I'm simply not sure of where to begin to do this. I've seen an article on uploading the .cshtml file onto a document library and referencing the document library in the Web Part, but it is a bit unclear.
Does anyone have an idea of how I can start? Or point me to a step-by-step guide to achieve what I am after.
What my end goal is: Take a piece of an MVC application, customize it and make it a Web Part. I need to be able to modify or access SharePoint content on that site which is why I cannot use an App Part.
Okay.
First install the Office Development Templates from
http://www.microsoft.com/visualstudio/eng/office-dev-tools-for-visual-studio
This will give you the following template selection on reopening Studio
Then navigate to wherever EwsManagedApi32.msi is and enter the following command in an elevated prompt -
EwsManagedApi32.msi addlocal="ExchangeWebServicesApi_Feature,ExchangeWebServicesApi_Gac"
Now your templates are usable and the one you want is "VS2012 Web Part".
Now, by default this will add an ASP.NET project, which is not what you want, so manually delete the ASP.NET project, add an MVC one, highlight the SharePoint project in Solution Explorer, hit F4, and select the MVC project in the "Web Project" dropdown at the bottom of the properties.
And there you go. One controller per web part, sorted.
I am sharing link SharePoint MVC webpart that uses Knock out framework using MVC for SharePoint. It has step by step instructions which might help you.
Hope this will be a good starting point
http://www.codeproject.com/Tips/739445/SharePoint-Razor-View-WebPart

How to alter the scaffolding output folder?

I can't seem to determine if the -Folder option was removed from the MvcScaffolding package for ASP.NET MVC. These two links indicate that it was used for altering the output folder for the items created by the scaffolds:
http://blog.stevensanderson.com/2011/01/13/mvcscaffolding-standard-usage/
How to change project and folder where MvcScaffolding generates controllers, views and repositories
I'm using the Package Manager Console in VS2010 for an MVC3 project. When I try to alter the output folder when scaffolding, say, a repository, there is no -Folder option in the list of options that appear when I enter "-" and press Tab. The options that sound closest to what I need are:
TemplateFolders
OverrideTemplateFolders
PipeOutput
But I can't find good documentation on what these really do either (I tried them but couldn't actually tell what they did). Am I missing something obvious? Thanks!

Report Wizard in an MVC Application

After some research, I understand that we can use sql server reporting in an mvc application as long as the view engine is web form instead of razor.
The tutorial I have been trying to follow is:
Creating an ASP.net reporting using Visual Studio 2010
The problem is in Part 2. I cannot find the local classes listed as Data Source. The only choice is to set up a new xsd file to connect to the database. How can I have my reports to use my data repositories as their data source?
The credit goes to TNCodeMonkey!
Not only the project has to be compiled first, we must have an index.aspx file in the root folder of the MVC Web Application.
I don't know why. But the Data source is populated with all my dll's once that magic file is in place.

Getting VS2010, and specifically a Razor view, to recognize custom "data-" attributes as valid

I know that HTML5 supports custom data-* attributes, and I know that VS2010 SP1 is supposed to have HTML5 support included.
However, when I installed VS2010 SP1, I'm still getting validation errors on elements with data-* attributes.
For example, this:
<a id="Clicky" data-for="#Model.Id">Clicky</a>
Yields the following warning in VS2010:
Validation (XHTML 1.0 Transitional): Attribute 'data-for' is not a valid attribute of element 'a'.
While I understand that these are just warnings and can safely be ignored, I'm trying to keep my site as standards compliant as possible, and if my warnings list is spammed with these warnings, I won't be able to see the valid warnings through all the noise.
Am I doing something wrong, or must I live with seeing these warnings?
Thanks in advance.
There is a little dropdown that you need to change to use HTML5 or others (XHTML 5, XHTML 1.1, etc.)
Click View --> Toolbars --> HTML Source Editing.
There will be a dropdown. Then choose HTML5.
There is also a "Web Standards Update" extension available in the Visual Studio Extension Manager that updates some of the CSS/HTML5 intellisense features.
http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83?SRC=VSIDE

Resources