Show Glow

Vipul
Posted by in ASP.NET category on for Beginner level | Views : 4366 red flag

This article show glow on any message
 
Introduction
Show Glow


Show Glow

This Artilce and code shows glow on message

1.Create Web application

2.In App_Code folder add one class file,Give Name Glow.cs

3.Write Following code in Glow.cs

namespace myControls

{

public class Glow:WebControl

{

private string _Text;

public string Text

{

get { return _Text; }

set { _Text = value; }

}

protected override HtmlTextWriterTag TagKey

{

get

{

return HtmlTextWriterTag.Div;

}

}

protected override void AddAttributesToRender(HtmlTextWriter writer)

{

writer.AddStyleAttribute(HtmlTextWriterStyle.Filter, "glow(Color=Aqua,Strength=5)");

base.AddAttributesToRender(writer);

}

protected override void RenderContents(HtmlTextWriter writer)

{

writer.Write(_Text);

}

public Glow()

{

this.Width = Unit.Parse("500px");

}

}

}

4.Add webForm Give any name as you wish

import using following,write below of this line at source side <%@ Page Language="C#" ......

<%@ Register TagPrefix="custom" Namespace="myControls" %>

<div>

<custom:Glow

id ="glow1"

Text="Hello"

Font-Size="50px"

ForeColor="brown"

Runat="server" />

</div>

5.Run and see the magic.

Page copy protected against web site content infringement by Copyscape

About the Author

Vipul
Full Name: vipul vk
Member Level: Starter
Member Status: Member
Member Since: 4/15/2009 9:08:15 PM
Country:

http://www.dotnetfunda.com
Working as a software developer

Login to vote for this post.

Comments or Responses

Login to post response

Comment using Facebook(Author doesn't get notification)