I'm getting a bunch of these errors for my image buttons, link buttons, text boxes, and labels. These errors are in my .aspx code. Why am I getting so many?
<%# Page Language="C#" AutoEventWireup="true" CodeFile="frmSearchPersonnel.aspx.cs" Inherits="frmSearchPersonnel" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div align="center">
</div>
</div>
<asp:Label ID="Label1" runat="server" Text="Search for employee by last name"></asp:Label>
<asp:TextBox ID="txtSearchName" runat="server"></asp:TextBox>
<p>
<asp:Button ID="btnSearch" runat="server" PostBackUrl="~/frmViewPersonnel.aspx"
Text="Search" onclick="btnSearch_Click" />
</p>
</form>
</body>
</html>.
The errors are under Label, TextBox & Button above in blue. The errors state:
Validation (): Element 'xxxx' is not supported.
The only problem I & my Resharper see is the period after the ending html tag.
</html>.
What are the errors you are getting?
Edit:
Here's a simple fix someone had:
http://weblogs.asp.net/alaaalnajjar/archive/2010/08/31/how-to-fix-quot-validation-element-xxxx-is-not-supported-quot-visual-studio-2010.aspx
the idea is to remove the folder "ReflectedSchemas" from paths:
Win XP : C:\Documents and Settings{username}\Application
Data\Microsoft\VisualStudio\10.0\ReflectedSchemas
Win Vista / 7: C:\Users\AppData\Roaming
\Microsoft\VisualStudio\10.0\ReflectedSchemas
Note: make sure that "Show hidden files, folders, and drives" is
selected from Folder Options,also don't forget to close VS before
deleting the folder.
This solution should work for VS2010 and VS2008,at VS2008 you have to
delete ReflectedSchemas from folder 9.0 not 10.0.
This issue has been reported before. I found an article with steps to resolve:
Close down Visual Studio 2008 (or Visual Studio 2010).
Go to Control Panel -> Appearances and Personalization -> Folder Options -> then select the View tab. Now make sure "Show hidden
files, folders, and drives" is selected and click OK.
Now browse to the following folder: Computer -> OS (C:) -> Users -> {username} -> AppData -> Roaming -> Microsoft -> VisualStudio -> 9.0 folder. Note: in Visual Studio 2010 would be 10.0 folder.
Now delete the "ReflectedSchemes" folder. This should fix "Validation (): Element '' is not supported" error for ASP.NET server
controls within Visual Studio 2008.
After reopening your Visual Studio 2008 project, you should now have intellisense working correctly for ASP.NET server controls.
See here for more details:
http://www.gotknowhow.com/articles/fix-validation-element-not-supported-visual-studio-2010
add this in your page.
<!DOCTYPE html>
<html lang="en">
istead of
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
In hopes of helping someone else from a google search like mine:
Visual Studio 2013 - I did the same as suggested by the others deleting the "ReflectedSchemes" folders to no avail.
Finally, I deleted <html xmlns="http://www.w3.org/1999/xhtml"> - then replaced it and the problem suddenly went away. Come to think of it, seems like I've done this before too.
FWIW....
Noticed I had to delete the contents of ReflectedSchemas in:
%AppData%\Roaming\Microsoft\VisualStudio\9.0\ReflectedSchemas\
and
%AppData%\Roaming\Microsoft\VisualStudio\10.0\ReflectedSchemas\
also followed the reset VS2010 settings:
https://msdn.microsoft.com/en-us/library/ms247075(v=VS.100).aspx
to get it to clear the problem.
For those that deleting of "ReflectedSchemas" folder has not worked - do following
Close Visual Studio
Try again to delete (Windows 7 paths):
C:\Users\DefaultAppPool\AppData\Roaming\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\Classic .NET AppPool\AppData\Roaming\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\Classic .NET AppPool\AppData\Local\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\[your_nt_name]\AppData\Local\Microsoft\VisualStudio\ReflectedSchemas
C:\Users\[your_nt_name]\AppData\Roaming\Microsoft\VisualStudio\ReflectedSchemas
For me above has not worked, so I simply copied whole folder
Users[your_nt_name]\AppData\Roaming\Microsoft\VisualStudio
from another machine where these problems did not occur. After this all ASP.net IntelliSence problems were gone.
I'm keeping compressed backup of VistualStudio folder in case this happens again.
Change the target validation to "HTML 5" and click OK, Element is an HTML 5 supported validation so it can not supported in XHTML1.0
Refer Below Screenshot Set Vadation to HTML5
Related
ImageI am setting up my web application (working) in the Windows Server 2016 Environment which has the IIS role set up. My application outputs the following error when I try to run it: "The page you are requesting cannot be served because of the extension configuration" error.
I have a simple application that has a label and needs to change the text of label on Page Load. My .aspx files work if I don't mention the CodeBehind file .aspx.cs file .
I believe this is a case of .aspx.cs file access. I have a much bigger application and I made this small one for asking this question. My guess is that I cannot access my .aspx.cs file.
I have tried adding "allow fileExtensions=".cs" ....." and this add cs to the list of allowed files. I have also tried using the aspnet_regiis -i to install asp.net which worked correctly.
As for my setup, I have added the IIS role, installed the ASP.NET 4.5 and its Extensible feature and also ASP.
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Intro.aspx.cs" Inherits="Intro" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
</head>
<body>
<asp:Label . ...../>
</body>
</html>
UPDATE :Thank you all for your responses. This stackoverflow community is great . As for the solution I enabled .NET 3.5 features , .net 4.5 features, and all features related to a Web Server . A more concrete answer would help but this worked for me. Thank you all .
Web.config
I want to use a Web Browser to access a website that uses JavaScript on load. I understand that Web Browser is a wrapper of the current installed version of Internet Explorer. However, testing the website on Internet Explorer yields no errors but does not work if I use the Web Browser to access the content.
I have also looked at my internet security settings to ensure it is enabled.
The issue I get is;
Awkwardly enough, I found the answer moments after posting this but I thought anyone who comes across the same problem as me will find solace in this answer;
It seems downloading the latest version of Internet Explorer is not enough and you must explicitly specify the version of IE to use by adding a new registry key.
HTML fix;
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
... other headers
</head>
<body>
... content
</body>
</html>
Via registry;
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION for 64-bit or 32-bit only machines.
Or go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION for 32-bit on 64-bit systems (It cannot hurt to add keys to both locations if you have them. If you do not have them, you can make the folders yourself).
Create a new DWORD key and name it the name of your application e.g. "myapp.exe" and then edit the value of the key. There are many different values you can add depending on the IE version you want to emulate. I entered 11001 (as a decimal value - 0x2AF9 in HEX) which emulates IE 11 (many more values located at: http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation).
If you're using Visual Studio like I am, you'll notice that this method might not even work. However, it does work. You need to manually open the .exe file using Explorer or terminal rather than run the project on Visual Studio.
If you wish to run the program on Visual Studio then consider adding a key for "myapp.vshost.exe" as this is used for debugging.
More information and source is from; http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version.
I hope this helps anyone with any issue regarding your Web Browser perhaps using the wrong IE version as a wrapper or functions are not working as intended.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
... other headers
</head>
<body>
... content
</body>
</html>
This will work out , This is the summery of Ryan Singh's answer
I have .NET Framework 2.0 project and AxWebBrowser control runing on Windows 7 with IE9 web browser.
When I put this code to my IE9 web browser:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9">
</head>
<body>
<script>alert(document.documentMode);</script>
</body>
</html>
I get value 9 - so it's correct.
But when a put the same code to AxWebBrowser in my project, I always get value 8 and my HTML5 code doesn't work properly.
Where is the problem?
You will have to use registry to enable Internet Feature Controls and set the IE version that you would like to use.
Here is a sample registry file:
(Don't forget to replace YOURPROGRAM.EXE with the name of your executable)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
"YOURPROGRAM.EXE"=dword:00002328
This can also be done dynamically from code.
Of course, if IE9 is not installed on the client computer you won't be able to use HTML5, then you can consider using another webbrowser control, there are plenty of them online.
See this page for more details: http://msdn.microsoft.com/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation
I solve the problem. The problem is that there are two FEATURE_BROWSER_EMULATION, one is "Wow6432Node", the other one without "Wow6432Node"
I have a C# .NET windows application that will get HTML files and use them to display data. The HTML files will have javascript in them to help parse/display the data, and one of them uses an activeXObject to display PDF files.
When I install a binary version of the windows application, the PDF file displays properly and is fine.
When I am running from DEBUG mode from VS2008, i get the error:
Failed to load details page. An
exception occurred in the script.
Error name: TypeError. Error message:
Object doesn't support this property
or method
They are both referring to the same HTML page, the only difference is one is a binary install and the other is just my DEBUG build running.
I need to get it working in DEBUG mode so I can test but I'm not sure what's wrong; Any suggestions would definitely be appreciated!
Edit: Sorry here is the HTML Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Received Fax Preview Page</title>
</head>
<body>
<object data="myfile.pdf" type="application/pdf" width="800" height="600">SUP</object>
</body>
</html>
And i'm just using the C# web browser to display it.
_webBrowser.DocumentText = htmlDoc;
Finally got it to work by switching to x86 platform in VS (from Any CPU) and building the project. I'm guessing since my machine is x64, in debug mode the application targets all x64 components and IE x64 can't load PDFs, but maybe in the binary (which is x64) it goes to the common IE x86 bit to open the PDF?
Not 100% sure the explanation, but it is working now.
I created this class library(ReportLib) with a simple Telerik report using Telerik Reporting Wizard. I then made this simple web application project, added ReportLib as a reference. Now in my asp page, intellisense is not detecting Telerik:ReportViewer tag! In the code behind too I have added the following ;-
using Telerik.Reporting;
using Telerik.ReportViewer;
What's wrong ? My web app project is building successfully. Why won't it detect the telerik tags?
[EDIT]
Do i need to register the Telerik.Reporting.dll on my aspx page too? How to do that ?
Registered assembly as follows..still wont detect the telerik:report viewer tag:-
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplicationReporting1._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%# Register Assembly="Telerik.Reporting" Namespace="Telerik.Reporting" TagPrefix="telerik" %>
<%# Register Assembly="Telerik.ReportViewer" Namespace="Telerik.ReportViewer" TagPrefix="telerik" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<tel
</div>
</form>
</body>
</html>
[EDIT]
ok in my web config file..there's no telerik assebly added that I can see..How so ? I did add the refernce to telerik reporting dll! Why didnt it show up in web config file?
Check the Telerik Reporting documentation about your problem. First, you will need to create your report within a class library project, and then assign the report to the Web Report Viewer.
In case you still have problems, contact Telerik - they will assist you with a more detailed reply.
Your project most likely, does not have the correct reference to the correct Telerik assmbly. The contractors we sometimes hire where I work, run into this and 100% of the time thats been the issue.
If you dont know how to register the control then go into the design mode for your page and drag it from the toolbar, and drop it into your page. VS will write the code for you.
The drag-and-drop solution will also take care of your web.config settings