DropShadow

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

This article is useful for displaying shadow
 
Introduction
These line of code will useful for displaying Shadow.

DropShadow

Follow following Steps

1.Take webApplication

2.Create one class file in App_Data folder,Give Name DropShadow.cs

3.Write following code in DropShadow.cs

namespace mycontrols

{

public class DropShadow : WebControl

{

private string _Text;

public string Text

{

get { return _Text; }

set { _Text = value; }

 

}

protected override void RenderContents(HtmlTextWriter writer)

{

writer.AddStyleAttribute(HtmlTextWriterStyle.Filter, "dropshadow(color=Pink,offX=3,offY=3);width:500px");

writer.RenderBeginTag(HtmlTextWriterTag.Div);

writer.Write(_Text);

writer.RenderEndTag();

 

}

}

}

4.Take one Webform

5.Write following Code in Default.aspx below of <%@ Page Language="C# line

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

6. Write following

<div>

<custom:DropShadow id="Dropshadow1"

Text="Hello"

Font-Size="30px"

runat="Server" />

</div>

 

7 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)