Erro de Validation XHTML
09/04/2012
0
Estou começando com telerik e já tenho várias dúvidas. Instalei o Silverlight e o telerik para criar gráficos(Barras e Linhas). Eu copiei dois exemplos na NET e estou adaptando às minhas necessidades. Está dando um erro assim em um dos exemplos.
Validation(XHTML 1.0 Transitional): Element usercontrol is not supported. Eu colei o códio dentro do Body da página Asp.Net. Tudo que tiver abaixo da tag <UserControl ....> eu colei do exemplo. Gostaria que vocês me ajudassem a resolver esse problema. Abaixo o código completo de minha aspx.
<%@ Page Language=C# AutoEventWireup=true CodeBehind=TesteBarras2.aspx.cs Inherits=Teste.Moni.UI.Web.TesteBarras2 %>
<!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 runat=server>
<title></title>
</head>
<body>
<form id=form1 runat=server>
<UserControl
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
xmlns:d=http://schemas.microsoft.com/expression/blend/2008
xmlns:telerik=http://schemas.telerik.com/2008/xaml/presentation
xmlns:chartCommands=clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting
xmlns:telerikQuickStart=clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls
xmlns:chart=clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting
xmlns:charting=clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting
xmlns:example=clr-namespace:Telerik.Windows.Examples.Chart.FirstLook
x:Class=Telerik.Windows.Examples.Chart.FirstLook.Example mc:Ignorable=d
d:DesignHeight=500 d:DesignWidth=800
VerticalAlignment=Center HorizontalAlignment=Center>
<UserControl.DataContext>
<example:OrderViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<example:OrderDataConverter x:Key=myConverter></example:OrderDataConverter>
<Style TargetType=chart:RadChart>
<Setter Property=Background Value=Transparent />
<Setter Property=FontSize Value=10 />
</Style>
<Style TargetType=charting:ChartLegend>
<Setter Property=Header Value= />
</Style>
<Style TargetType=telerik:RadLinearSparkline>
<Setter Property=Margin Value=0,2,0,3 />
</Style>
<Style TargetType=telerik:RadButton>
<Setter Property=HorizontalAlignment Value=Left />
<Setter Property=Height Value=22 />
</Style>
<Style x:Key=TransitionControlStyle TargetType=telerik:RadTransitionControl>
<Setter Property=Transition>
<Setter.Value>
<telerik:FadeTransition />
</Setter.Value>
</Setter>
</Style>
<Style TargetType=charting:ChartArea>
<Setter Property=EnableAnimations Value=False />
<Setter Property=TransitionControlStyle Value={StaticResource TransitionControlStyle} />
</Style>
<Style x:Key=H1 TargetType=TextBlock>
<Setter Property=FontFamily Value=Segoe UI Light />
<Setter Property=FontSize Value=18 />
</Style>
<Style x:Key=H2 TargetType=TextBlock>
<Setter Property=FontFamily Value=Segoe WP Semibold />
<Setter Property=FontSize Value=9 />
</Style>
</UserControl.Resources>
<telerikQuickStart:QuickStart.ExampleHeader>
<TextBlock Text=Sales Dashboard Margin=8 />
</telerikQuickStart:QuickStart.ExampleHeader>
<Border telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled=True>
<Grid x:Name=ExampleRoot>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height=* />
<RowDefinition Height=Auto />
<RowDefinition Height=10 />
<RowDefinition Height=* />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=5* />
<ColumnDefinition Width=0.5* />
<ColumnDefinition Width=4* />
</Grid.ColumnDefinitions>
<Grid Grid.Column=0 Grid.Row=0>
<Grid.RowDefinitions>
<RowDefinition Height=Auto />
<RowDefinition Height=10 />
<RowDefinition Height=* />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=5* />
<ColumnDefinition Width=3* />
</Grid.ColumnDefinitions>
<StackPanel Margin=5,5,0,0>
<TextBlock x:Name=SalesByProductTitle Text={Binding SalesByProductTitle} Style={StaticResource H1} />
<TextBlock x:Name=SalesByProductSubTitle Text=CLICK ON THE SERIES FOR MORE DETAILS Style={StaticResource H2} />
</StackPanel>
<telerik:RadButton x:Name=GoBackButton1
Content=Go Back
Click=GoBack1_Click
Command={Binding GoBack1Command}
Grid.Column=1 />
<chart:RadChart Grid.Row=2 Grid.ColumnSpan=2 x:Name=barChart ItemsSource={Binding Data} SeriesMappings={Binding BarChartSeriesMappings} >
<chart:RadChart.DefaultView>
<charting:ChartDefaultView>
<charting:ChartDefaultView.ChartLegend>
<charting:ChartLegend Name=legend1 />
</charting:ChartDefaultView.ChartLegend>
<charting:ChartDefaultView.ChartArea>
<charting:ChartArea Grid.ColumnSpan=2
LegendName=legend1
ItemWidthPercent=50
Command={Binding ChartArea1ClickCommand}>
<charting:ChartArea.AxisX>
<charting:AxisX DefaultLabelFormat={Binding AxisXLabelFormat} />
</charting:ChartArea.AxisX>
<charting:ChartArea.AxisY>
<charting:AxisY IsZeroBased=True ExtendDirection=None />
</charting:ChartArea.AxisY>
</charting:ChartArea>
</charting:ChartDefaultView.ChartArea>
</charting:ChartDefaultView>
</chart:RadChart.DefaultView>
</chart:RadChart>
....... Retirei parte do código, porque tem mais de 60000 linhas e não é suportado pelo forum
</UserControl>
</form>
</body>
</html>
Validation(XHTML 1.0 Transitional): Element usercontrol is not supported. Eu colei o códio dentro do Body da página Asp.Net. Tudo que tiver abaixo da tag <UserControl ....> eu colei do exemplo. Gostaria que vocês me ajudassem a resolver esse problema. Abaixo o código completo de minha aspx.
<%@ Page Language=C# AutoEventWireup=true CodeBehind=TesteBarras2.aspx.cs Inherits=Teste.Moni.UI.Web.TesteBarras2 %>
<!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 runat=server>
<title></title>
</head>
<body>
<form id=form1 runat=server>
<UserControl
xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml
xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006
xmlns:d=http://schemas.microsoft.com/expression/blend/2008
xmlns:telerik=http://schemas.telerik.com/2008/xaml/presentation
xmlns:chartCommands=clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting
xmlns:telerikQuickStart=clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls
xmlns:chart=clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting
xmlns:charting=clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting
xmlns:example=clr-namespace:Telerik.Windows.Examples.Chart.FirstLook
x:Class=Telerik.Windows.Examples.Chart.FirstLook.Example mc:Ignorable=d
d:DesignHeight=500 d:DesignWidth=800
VerticalAlignment=Center HorizontalAlignment=Center>
<UserControl.DataContext>
<example:OrderViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<example:OrderDataConverter x:Key=myConverter></example:OrderDataConverter>
<Style TargetType=chart:RadChart>
<Setter Property=Background Value=Transparent />
<Setter Property=FontSize Value=10 />
</Style>
<Style TargetType=charting:ChartLegend>
<Setter Property=Header Value= />
</Style>
<Style TargetType=telerik:RadLinearSparkline>
<Setter Property=Margin Value=0,2,0,3 />
</Style>
<Style TargetType=telerik:RadButton>
<Setter Property=HorizontalAlignment Value=Left />
<Setter Property=Height Value=22 />
</Style>
<Style x:Key=TransitionControlStyle TargetType=telerik:RadTransitionControl>
<Setter Property=Transition>
<Setter.Value>
<telerik:FadeTransition />
</Setter.Value>
</Setter>
</Style>
<Style TargetType=charting:ChartArea>
<Setter Property=EnableAnimations Value=False />
<Setter Property=TransitionControlStyle Value={StaticResource TransitionControlStyle} />
</Style>
<Style x:Key=H1 TargetType=TextBlock>
<Setter Property=FontFamily Value=Segoe UI Light />
<Setter Property=FontSize Value=18 />
</Style>
<Style x:Key=H2 TargetType=TextBlock>
<Setter Property=FontFamily Value=Segoe WP Semibold />
<Setter Property=FontSize Value=9 />
</Style>
</UserControl.Resources>
<telerikQuickStart:QuickStart.ExampleHeader>
<TextBlock Text=Sales Dashboard Margin=8 />
</telerikQuickStart:QuickStart.ExampleHeader>
<Border telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled=True>
<Grid x:Name=ExampleRoot>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height=* />
<RowDefinition Height=Auto />
<RowDefinition Height=10 />
<RowDefinition Height=* />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=5* />
<ColumnDefinition Width=0.5* />
<ColumnDefinition Width=4* />
</Grid.ColumnDefinitions>
<Grid Grid.Column=0 Grid.Row=0>
<Grid.RowDefinitions>
<RowDefinition Height=Auto />
<RowDefinition Height=10 />
<RowDefinition Height=* />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=5* />
<ColumnDefinition Width=3* />
</Grid.ColumnDefinitions>
<StackPanel Margin=5,5,0,0>
<TextBlock x:Name=SalesByProductTitle Text={Binding SalesByProductTitle} Style={StaticResource H1} />
<TextBlock x:Name=SalesByProductSubTitle Text=CLICK ON THE SERIES FOR MORE DETAILS Style={StaticResource H2} />
</StackPanel>
<telerik:RadButton x:Name=GoBackButton1
Content=Go Back
Click=GoBack1_Click
Command={Binding GoBack1Command}
Grid.Column=1 />
<chart:RadChart Grid.Row=2 Grid.ColumnSpan=2 x:Name=barChart ItemsSource={Binding Data} SeriesMappings={Binding BarChartSeriesMappings} >
<chart:RadChart.DefaultView>
<charting:ChartDefaultView>
<charting:ChartDefaultView.ChartLegend>
<charting:ChartLegend Name=legend1 />
</charting:ChartDefaultView.ChartLegend>
<charting:ChartDefaultView.ChartArea>
<charting:ChartArea Grid.ColumnSpan=2
LegendName=legend1
ItemWidthPercent=50
Command={Binding ChartArea1ClickCommand}>
<charting:ChartArea.AxisX>
<charting:AxisX DefaultLabelFormat={Binding AxisXLabelFormat} />
</charting:ChartArea.AxisX>
<charting:ChartArea.AxisY>
<charting:AxisY IsZeroBased=True ExtendDirection=None />
</charting:ChartArea.AxisY>
</charting:ChartArea>
</charting:ChartDefaultView.ChartArea>
</charting:ChartDefaultView>
</chart:RadChart.DefaultView>
</chart:RadChart>
....... Retirei parte do código, porque tem mais de 60000 linhas e não é suportado pelo forum
</UserControl>
</form>
</body>
</html>
Pjava
Curtir tópico
+ 0
Responder
Posts
09/04/2012
Joel Rodrigues
Bem, até onde eu vejo, o código que você colou no body é de um UserControl, ou seja, você deveria adicionar um UserControl ao projeto, substituir o código por esse aí e depois adicionar esse UserContrl ao seu formulário.
Pesquise sobre UserControls.
Boa sorte.
Pesquise sobre UserControls.
Boa sorte.
Responder
Clique aqui para fazer login e interagir na Comunidade :)