I am a new to CSS world, so please help me out to figure it out.
I have tried to use a sample css from DevExpress ASP MVC demo and I have received a below error msg. I have two questions regarding this error msg.
What do I need add to resolve this error?
What deos "dx:" means?
By the way, I am getting "Unrecognized tag prefix or device filter 'dx' in visual studio 2010.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Unknown server tag 'dx:Head'.
Source Error:
Line 14: <title></title>
Line 15: <asp:ContentPlaceHolder id="CustomTopHeadHolder" runat="server" />
Line 16: <dx:Head ID="Head" runat="server" />
Line 17: <asp:ContentPlaceHolder id="CustomHeadHolder" runat="server" />
The "dx" is just a tag to tell it is a DevExpress Command. For the error message try registering the tags you are going to use.
For example if you are planning to use a ASPxNavBar then you will have to add this
<%# Register Assembly="DevExpress.Web.v10.2, Version=10.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxNavBar" TagPrefix="dx" %>
Note this is for the Version 10.2.6. You will have to add the appropriate one for your project
Hope this helps.
Looks like a namespace prefix. Have a look at this question for guidance.
Related
I have started learning asp.net. I went through basics and now i am started to build small application.
I am using VS 2012 and created Empty Web Application Project with VB.
I can see web.config created automatically and following are the line written in it :
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
I created Default.aspx file and wrote following lines of code :
<%# Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" %>
<%
HelloWorldLabel.Text = "Hello, world!";
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label runat="server" id="HelloWorldLabel"></asp:Label>
</div>
</form>
</body>
</html>
When I am running this application on browsers, I am getting following error that page :
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30037: Character is not valid.
Source Error:
Line 2:
Line 3: <%
Line 4: HelloWorldLabel.Text = "Hello, world!";
Line 5: %>
Line 6:
Source File: c:\users\anjum.banaras\documents\visual studio 2012\Projects\Students\Students\Default.aspx Line: 4
Can any one help me on this ? I am just beginner on asp.net. Your help can save lots of my time.
Thanking you in advance !!
You've set the programming language of the page to VB (Visual Basic), but the line it is complaining about is written in C# syntax. Either change the line to be valid VB code:
HelloWorldLabel.Text = "Hello, world!"
(I think that removing the ; is all that's needed, but I never code VB so I'm not sure)
or change the page language to C#:
<%# Page Language="c#" AutoEventWireup="false" CodeBehind="Default.aspx.vb" %>
I was getting this error since my designer file was missing from the solution (I don't know how,seriously). So try adding a designer file for the aspx file in the solution; it worked for me.
I copied my code to another editor (notepad++) and was able to see the problematic chars. After i removed them, the code worked again.
��myClass.myArray(28) = "myFirstValue"
��myClass.myArray(29) = "myValue"
I have been told I will be let go at the end of the week if I can't figure this out by the end of the day. I need help in figuring out this issue. I am trying to create a .aspx page for a sharepoint site. This is the code I have...
<script runat="server">
Sub submit(Source As Object, e As EventArgs)
button1.Text="You clicked me!"
End Sub
</script>
<!DOCTYPE html>
<html>
<body>
<form runat="server">
<asp:Button id="button1" Text="Click me!" runat="server" OnClick="submit" />
</form>
</body>
</html>
I keep getting error messages every time I load the page. I ripped this code off the internet and when I load the page it says:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Code blocks are not allowed in this file.
Source Error:
Line 3: button1.Text="You clicked me!"
Line 4: End Sub
Line 5: </script>
Line 6:
Line 7: <!DOCTYPE html>
Please help me. Why am I getting this message?
SharePoint doesn't allow inline code in .aspx files by default. You'll need to change that setting in the web.config if you want to do this, but it's not recommended. See the link #Mark posted in the comments.
As an alternative, you can create a webpart, and add that to the page. See this article for more help on how to do this.
You can allow adding code inside sharepoint pages by adding below lines in the web.config file
<PageParserPaths>
<PageParserPath VirtualPath="/pages/test.aspx" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
Where "/pages/test.aspx" is the path of your page , or you can add it as "/_catalogs/masterpage/*" for example to add all masterpages files.
When I open an Webpage with SmartTarget configured, I am getting two different errors:
Error 1
First time I get this error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
com/tridion/marketingsolution/profile/Contact
================================================
Some configured classpath roots cannot be found
================================================
ClassPath : C:\tridion\Publicationsites\TestRD\staging\bin\bin
I am not sure how Line 2, comes into the picture, but when I add another bin folder within the already existing bin folder, the error goes. Is something wrong with any of the config file?
Error 2
When I open the page after I apply the workaround for the above error, I receive the following error
Unknown server tag 'smarttarget:Query'.
<smarttarget:Query View="lister" AllowDuplicates="true" Timeout="5000"
Publication="tcm:0-14-1" runat="server" Id="as">
Line 3: <smarttarget:Item runat="server" TemplateUri="tcm:14-1319-32"
ComponentUri="tcm:14-1321"></smarttarget:Item>
Where do I need to add the smarttarget tag? Should it be in the web.config file? Can you please share the syntax. I have tried to accurately implement the ST as mentioned in the live docs. Any area that I need to recheck?
Question 3
I am pasting a screenshot of my Compound Page Template below:
When I publish this page, the HTML markup present in the Main Page Design TBB is not published at all. Only the markup generated by the Add SmartTarget to Promotion TBB exist in the aspx Page.
<smarttarget:Query View="lister" AllowDuplicates="true" Timeout="5000"
Publication="tcm:0-14-1" runat="server" Id="as">
<smarttarget:Item runat="server" TemplateUri="tcm:14-1319-32"
ComponentUri="tcm:14-1321"></smarttarget:Item>
<smarttarget:Promotions MaxItems="2" Region="sidebar" runat="server">
<ItemTemplate>
<smarttarget:PromotionalItems runat="server">
<ItemTemplate>
<tridion:ComponentPresentation runat="server"
PageURI="tcm:14-1119-64"
ComponentURI="<%# Eval("ComponentUri") %>"
TemplateURI="<%# Eval("TemplateUri") %>"/>
</ItemTemplate>
</smarttarget:PromotionalItems>
</ItemTemplate>
<FallbackContent>
<tridion:ComponentPresentation runat='server'
ComponentUri='tcm:14-1322'
TemplateUri='tcm:14-1323-32'/>
</FallbackContent>
</smarttarget:Promotions>
</smarttarget:Query>
Is my implementation correct ?
That's a lot of questions in one entry, but I'll try to answer them here.
Looks like you don't have the right Tridion home directory and it ends up checking 'bin' under the current directory instead. See my blog post on the subject on how this is figured out (and thus how you can solve it): How Tridion Content Delivery loads configuration files (.NET)
This is standard .NET functionality. You can define a prefix in the same page or, as recommended, in the web.config. The exact markup for the web.config is: <add tagPrefix="smarttarget" namespace="Tridion.SmartTarget.Web.UI" assembly="Tridion.SmartTarget" />
Only one "Output" item is used from the package (the last one added). So the way you've split up your Dreamweaver Templates currently would indeed mean that you only get the output from "ST Page Region". I don't know what the intention was with it, so I can't suggest a good way to solve it aside from getting rid of it and putting the tcdl:region directly inside "Main Page Design TBB".
Good luck with it :)
i used the time picker that has described on this link Time Picker
But i got one parser error while debugging. the error message is:
Parser Error Message: Unknown server tag 'cc1:TimeSelector'.
How to avoid this one? Please help me..
Make sure you register the control at the top of your page:
<%# Register TagPrefix="cc1" TagName="TimeSelector" Assembly="TimePicker" Namespace="MKB.TimePicker" %>
I have a Visual Studio 2008 project that is showing the following warning when using User Controls, and I haven’t been able to find a solution anywhere.
Element <element>is not a known element
How can I fix this?
This sounds like a classic re-build your solution and "close and re-open Visual Studio" problem.
It's possible it may also be related to a similar problem I had which I answered at Resolving "Validation (): Element ‘xxxx’ is not supported" warning in Visual Studio 2005/2008.
This can also occur if the element you're trying to add is within the tags of another element that it shouldn't be within.
For Example:
<asp:Button ID="button" runat="server" >
<asp:Repeater ID="repeater" runat="server"></asp:Repeater>
</asp:Button>
Or in my case, placing an <asp:Repeater> in an <asp:UpdatePanel> and forgetting to put it in the <ContentTemplate>:
<asp:UpdatePanel ID="upPanel" runat="server">
<ContentTemplate>
<asp:Repeater ID="rep" runat="server">
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
Apparently this can also happen if the Namespace name in the .ascx file doesn't match the namespace in the ascx.cs (codebehind) file. Just one more issue to check.
From the OP:
The apparent solution to this is to make sure that the TagName is the
name of control class.
So for my example, the following displayed the warning:
<%# Register Src="~/path/to/Control.ascx" TagName="tagName" TagPrefix="tagprefix" %>
<tagprefix:tagName runat="server" id="controlID" />
But changing it to:
<%# Register Src="~/path/to/Control.ascx" TagName="Control" TagPrefix="tagprefix" %>
<tagprefix:Control runat="server" id="controlID" />
fixes it.
Check you might be on ContentPlaceHolderID="MainContent" on Asp.net, so place the code on a new placeholder
This can happen if something's missing in your web.config too. I just ran into this error while copying a custom control from one solution to another, and the page still couldn't find the element. If none of the above fixes the problem, check this section of the web.config and make sure your control is included:
<controls>
<add tagPrefix="fu" namespace="Fubar.Base" assembly="Fubar" />
...
</controls>
After adding this, and then closing/reopening the solution, the problem went away.
I found that the issur was resolved when I changed the Build Action from "content" to "compile" for the .ascx file and afterwards chaned it back.
This can happen when Visual Studio has problems loading assemblies that exist in the web.config file.
Take a look at your web.config file and make sure that all <dependentAssembly> tags have a valid assemblyIdentity value.
Take a look at the output window and make sure that there are no error or warning about dependencies, such as:
Could not load file or assembly 'System.Something.Doesnt.Exist, Version=... or one of its dependencies. The located assembly's
manifest definition does not match the assembly reference.
Remove unnecessary or corrupted values and rebuild your solution.