Krunal Parate

Krunal Parate

  • NA
  • 30
  • 13.1k

gettin an error of Error 2:The server tag is not well formed

Sep 5 2015 4:35 PM
i write the below code for creating user control .but giving me an error. the following code i wrote in ascx file
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UcMarquee.ascx.cs" Inherits="UcMarquee" %>
<marquee ID="marquee2" runat="server" direction="right" style="background-color:blueviolet;" backcolor:"White" ForeCore:"green" FontSize="12">
<asp:Label ID="lbl" runat="server" Text="You are the rockstar IT World" />
</marquee>
 
and the following code in code cs file
public string direction
{
get { return marquee1.Attributes["direction"]; }
set { marquee1.Attributes["direction"]=value; }
}
public Color backcolor
{
get { return Color.FromName(marquee1.style["background-color"]);}
set { marquee1.style["background-color"]:value.Name; }
}
public FontUnit FontSize
{
get { return lbl.FontSize; }
set { lbl.FontSize = value; }
}
public string Text
{
get { return lbl.Text; }
set { lbl.ForeColor = value; }
}
public Color ForeCore
{
get { return lbl.ForeColor; }
set { lbl.ForeColor = value; }
}
 
 

Answers (1)