Feedback Form

Thursday, November 20, 2008

Connecting to Server When All Active Sessions are Used

Simply use mstsc -console if didn't work then use mstsc -admin.

Reference

Saturday, October 25, 2008

Microsoft new home page design

microsoft changed their home page design a little bit, now you can reach everything from the home page more easy and more clear.

MicrosoftHomePage


kick it on DotNetKicks.com

Monday, October 20, 2008

Small Tip, Restore Database with replace "MSSQL 2005"

RESTORE DATABASE AdventureWorks
    FROM DISK = 'C:\BackupAdventureworks.bak'
            WITH REPLACE

Wednesday, October 15, 2008

Small Tips "IIS Restart"

iisreset /noforce

reference: http://technet.microsoft.com/en-us/library/cc758159.aspx

Sunday, September 14, 2008

a href=”javascript:void(0);” — avoid the void

ist2_3163272-computer-programming-code-with-pen

One of the most important hints about javascript and web development.

a href=”javascript:void(0);” — avoid the void


kick it on DotNetKicks.com

Wednesday, September 10, 2008

DotNetNuke container customized

You will find in the following zipped file the default Image Header - Color Background container but I made customized it to use div instead of tables.

http://cid-fa1922bb57748e08.skydrive.live.com/self.aspx/Shared%20Source/NewContainer.zip

dnn-seo-spider-net

kick it on DotNetKicks.com

DotNetNuke skin customized

You will find in the following zipped file the default DNN-Blue skin but I made customized it to use div instead of tables and to be 4 columns instead of 3.

Note: You will find the admin panel down instead of top.

http://cid-fa1922bb57748e08.skydrive.live.com/self.aspx/Shared%20Source/NewSkin.zip

dotnetnuke_by_t3kton

kick it on DotNetKicks.com

Wednesday, September 03, 2008

Browsers War




They will fight "Browsers Companies", we will win "Users" :)

Friday, August 29, 2008

Just a question "Yahoo Shuts Down Mash"


Yahoo Shuts Down Mash, 0-4 On Social Networking


What will happen for you if you saw the following news while checking your mails or RSS?

Google Shuts Down Google Docs (will lose all your documents?)
Google Shuts Down Blogger (will lose all your ideas you wrote?)
Google Shuts Down Gmail (will lose your mails? "hell")

Facebook Shuts Down (will lose contact to all you friends?)



My Advice:
Use these tools, they are nice and its a must to use them, but please don't put all what you have there, to make your life rely on them, you still have space on your hard disc for saving files, you still have a small note to save your ideas, contacts,.......

Saturday, August 16, 2008

List of countries, cities, languages

WORLD_MAP_by_SUNZHINE

You will find in the following links list of countries, cities, and their languages in CSV format, you can import into any database:

Countries:

http://www.ziddu.com/download/1936707/Country.csv.html

Cities:

http://www.ziddu.com/download/1936708/City.csv.html

Languages:

http://www.ziddu.com/download/1936713/Language.csv.html

and the following is the sql script to create these tables in sql server 2005:

USE [World]
GO
/****** Object: Table [dbo].[City] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[City](
[ID] [int] NOT NULL,
[Name] [nvarchar](35) COLLATE Arabic_CI_AS NOT NULL,
[CountryCode] [nvarchar](3) COLLATE Arabic_CI_AS NOT NULL,
[District] [nvarchar](20) COLLATE Arabic_CI_AS NULL,
[Population] [int] NULL
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Country] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Country](
[Code] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Name] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Continent] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[Region] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[SurfaceArea] [nvarchar](150) NOT NULL,
[IndepYear] [nvarchar](150) NULL,
[Population] [nvarchar](150) NOT NULL,
[LifeExpectancy] [nvarchar](150) NULL,
[GNP] [nvarchar](150) NULL,
[GNPOld] [nvarchar](150) NULL,
[LocalName] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[GovernmentForm] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
[HeadOfState] [nvarchar](150) COLLATE Arabic_CI_AS NULL,
[Capital] [nvarchar](150) NULL,
[Code2] [nvarchar](150) COLLATE Arabic_CI_AS NOT NULL,
CONSTRAINT [PK_Country] PRIMARY KEY CLUSTERED
(
[Code] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
/****** Object: Table [dbo].[Language] Script Date: 08/16/2008 14:48:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Language](
[CountryCode] [nvarchar](50) COLLATE Arabic_CI_AS NOT NULL,
[Language] [nvarchar](50) COLLATE Arabic_CI_AS NOT NULL,
[IsOfficial] [bit] NULL,
[Percentage] [nvarchar](50) COLLATE Arabic_CI_AS NULL,
CONSTRAINT [PK_Language] PRIMARY KEY CLUSTERED
(
[CountryCode] ASC,
[Language] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


kick it on DotNetKicks.com

Saturday, August 02, 2008

Subsonic going visual ( SubStage )

Subsonic is going up in subsonic,

everyday we feel how subsonic is a very good tool.

They created a good visual tool called SubStage to easily  generate code.

http://subsonicproject.com/2-1-pakala/using-substage/

 subsonic

Saturday, July 05, 2008

Select an option in select tag by value

<SELECT name="fruit">
<OPTION value="apple">apple</option>
<OPTION value="orange">orange</option>
<OPTION value="pear">pear</option>
</SELECT>

If you need to select an option in a select tag by index you can do the following:

document.getElementById('dropDown').selectedIndex = 1;


But if you want to select an option in a select tag by value you can do the following:

for(var i=0; i<document.getElementById('dropDown').options.length;i++)
        if(document.getElementById('dropDown').options[i].value == "MYVALUE")
document.getElementById('dropDown').selectedIndex = i;



kick it on DotNetKicks.com

Thursday, June 19, 2008

Disable or stop AutoCompleteExtender (Javascript)

To disable or stop the AutoCompleteExtender from running or calling its service to load auto suggested list, (Using Javascript)

Its very simple

-Set the BehaviorID property for the AutoCompleteExtender

<ajaxToolkit:AutoCompleteExtender
runat="server"
ID="autoSuggest"
TargetControlID="SearchBox"
ServiceMethod="GetSuggestedList"
ServicePath="~/_Services/AutoSuggest.asmx"
MinimumPrefixLength="2"
CompletionInterval="1"
EnableCaching="true"
CompletionSetCount="10"
CompletionListCssClass="AutoSuggestSearch"
CompletionListItemCssClass="listItem"
CompletionListHighlightedItemCssClass="highlightedListItem"
BehaviorID="autoSuggest"
/>



Then using javascript just write:




function selectType()
{
var a = $find("autoSuggest");
a.set_serviceMethod('');
}


By setting the service method to empty, the autosuggestextender will not find the service to call and will stop working

kick it on DotNetKicks.com

Tuesday, June 17, 2008

Window.open invalid argument

Just a hint about a simple problem could happen to you while writing javascript code to open a new browser window using window.open, it may give you the following error message box

windowopenerror

in case you wrote it like that:

window.open("http://www.google.com", "This Is My Page", "status=1, width=300,height=500");

where is the wrong argument?

its the name argument "This Is My Page"

You can write it like that (without spaces):

window.open("http://www.google.com", "ThisIsMyPage", "status=1, width=300,height=500");

Note:

It wont give you any errors in firefox in both cases, this error just happen in IE.

window.open good article


kick it on DotNetKicks.com

Saturday, May 31, 2008

Post to your blog without ever leaving Firefox (ScribeFire)

Post to your blog without ever leaving Firefox

ScribeFire is an extension for the Mozilla Firefox Web Browser that integrates with your browser to let you easily post to your blog: you can drag and drop formatted text from pages you are browsing, take notes, and post to your blog.

Wednesday, May 28, 2008

Links

The 7 Habits of Highly Effective Developers
A Dual Slider for AJAX Control Toolkit

What's Killing Twitter: Twitter Gets Help Digging its Grave

Ranking Your Blog - Managing and Gaining Popularity

Free eBook - Best of Simple Talk ASP.NET

 

Hooked on LINQ - Developers' Wiki for .NET Language Integrated Query

 

ASP.NET - Precompiled Site Options

 

The difference between ID, ClientID and UniqueID

 

WebServiceStudio

 

IETester Renders Sites like Internet Explorer 5.5 Through 8

 

15 Tools to Help You Develop Faster Web Pages

Take care from your HTML comments

Commenting in html code may make a web page renders the wrong way,

The problem i faced is if you wrote:

<!-- some comments <!-- another some comments -->

OR

<!------> hello-->

Not all HTML parsers get this right, so my problem was that the VS and dream weaver consider it as comments but in the browser i saw "some comments, hello-->" showing, so the browser didn't consider it as a HTML comment, so take care from this point.

 

See some more hints about html comments

Thursday, May 22, 2008

The biggest collection of "Programming Jokes"

The best and biggest programming jokes i read online:

http://www.devtopics.com/best-programming-jokes/




kick it on DotNetKicks.com

Friday, May 16, 2008

Add Microsoft Ajax reference to javascript file

To use microsoft ajax library reference inside your javascript file and see the Intellisense (VS 2008) while writing your javascript code:


/// <reference name="MicrosoftAjax.debug.js" />


kick it on DotNetKicks.com

Thursday, May 15, 2008

Show hide system objects SQL Server's Enterprise Manager

If you want to show or hide the system objects in SQL server's enterprise manager such as "master database, system tables, system stored procedures":

1- In SQL Server 7.0 and SQL Server 2000:


Step 1:


Step 2:

2- In SQL Server 2005's Management Studio:

Step 1:

Step 2:

Hint: In SQL Server 2005's Management Studio you will need to restart the management studio to make changes take effect.


kick it on DotNetKicks.com

Wednesday, April 30, 2008

Free File hosting

i found a very good website for file hosting for free.
You can upload there any files and refer friends to download.
try it:

Ziddu





Thursday, March 27, 2008

Free Icons 3 (32 X 32)

Download many free icons.

1039 Free icon.

Download by clicking on the following links.

actions

apps

devices

filesystems

mimetypes

22 X 22 Version

16 X 16 Version

Saturday, March 22, 2008

Add to bookmarks

Javascript simple code to add the current url to bookmarks (FireFox), or Favorites (IE).

function addToBookMarks()
{
if(document.all) //IE
window.external.AddFavorite(location.href,document.title);
else if(window.sidebar)window.sidebar.addPanel //FireFox
(document.title,location.href,'');
}

kick it on DotNetKicks.com

Saturday, March 15, 2008

Free Icons 2 (22 X 22)

Download many free icons.

1039 Free icon.

Download by clicking on the following links.

actions

apps

devices

filesystems

mimetypes



16 X 16 Version

Friday, March 14, 2008

Fraction To Decimal

kick it on DotNetKicks.com

I wrote a simple vb.net code to convert from Fraction to decimal easily:

Private Function FractionToDecimal(ByVal frac As String) As String
Dim decimalVal As String = "0"
Dim upper As Decimal = 0
Dim lower As Decimal = 0
Dim remain As Decimal = 0
If frac.IndexOf("/") <> -1 Then


If frac.IndexOf(" ") <> -1 Then
remain = CType(frac.Substring(0, frac.IndexOf(" ")), Decimal)
frac = frac.Substring(frac.IndexOf(" "))
End If

upper = CType(frac.Substring(0, frac.IndexOf("/")), Decimal)
lower = CType(frac.Substring(frac.IndexOf("/") + 1), Decimal)

decimalVal = (remain + (upper / lower)).ToString
End If
Return decimalVal
End Function

Decimal To Fraction

Change from decimal to fraction using javascript:

I got a sample after searching on google and found a good sample, i can't remember the website link, but i tried it in a website and it worked fine with me.

Number.prototype.fraction=fraction;
function fraction(item){
if(item.value != "" && item.value.indexOf(".")!=-1 && item.value.indexOf("/")==-1)
{
decimal=item.value
if(!decimal){
decimal=this;
}
whole = String(decimal).split('.')[0];
decimal = parseFloat("."+String(decimal).split('.')[1]);
num = "1";
for(z=0; z<String(decimal).length-2; z++){
num += "0";
}
decimal = parseInt(decimal*num);
num = parseInt(num);
for(z=2; z<decimal+1; z++){
if(decimal%z==0 && num%z==0){
decimal = decimal/z;
num = num/z;
z=2;
}
}
item.value= ((whole==0)?"" : whole+" ")+decimal+"/"+num;
}
}


kick it on DotNetKicks.com

Tuesday, March 11, 2008

Free Icons 1 (16x16)

Download many free icons.

1039 Free icon.

Download by clicking on the following links.

actions

apps

devices

filesystems

mimetypes



kick it on DotNetKicks.com

Wednesday, March 05, 2008

Download ICDL books for free

Download ICDL books for free.
communication
Database
Excel
IT
P. Point
Using the Computer
Word

Sunday, March 02, 2008

IGoogle Themes


Build your own custom igoogle theme:


You can build it yourself easily:
http://code.google.com/apis/themes/docs/dev_guide.html

And you can use a small tool creating it fast
http://hawidu.com/themes/

Enjoy...

Wednesday, February 27, 2008

Pure Chat sample

As axosoft company said on their website:
PureChat is one of the most attractively priced live web chatting solutions on the market.

I see its very simple one, it a good choice if:
Your budget is not a lot
You don't want any advanced communication between your operators and users.
You don't want file transfer or sharing.

Its very simple and clear.

I made a small sample using pure chat, its very simple and working nice.

Download sample

How to make your own read this


kick it on DotNetKicks.com

Monday, February 18, 2008

Ooops i closed the wrong tab (firefox)

Some times we close the wrong tab in firefox browser, what can we do :(
Its simple:
Press:

Ctrl+Shift+T (firefox windows)
Cmd+Shift+T (firefox mac)

Cool :) .....

Friday, February 08, 2008

SlideShowExtender Fade effect

You can make fade effect while sliding and there is a good way by using SlideShowExtender + AnimationExtender like the following good sample:

<%@ Page Language="C#"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
[System.Web.Services.WebMethod]
public static AjaxControlToolkit.Slide[] GetSlides()
{
return new AjaxControlToolkit.Slide[] {
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Blue hills.jpg", "Blue Hills", "Go Blue"),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Sunset.jpg", "Sunset", "Setting sun"),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Winter.jpg", "Winter", "Wintery..."),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/Water lilies.jpg", "Water lillies", "Lillies in the water"),
new AjaxControlToolkit.Slide("AjaxToolKit/SliderShowImages/VerticalPicture.jpg", "Sedona", "Portrait style picture")};
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script language="javascript" type="text/javascript">
var fadein;
var fadeout;

function pageLoad()
{
var ss=$find("ss1");
ss.add_slideChanging(onChanging);

var ae=$find("ae");
var be=ae.get_OnLoadBehavior();
var an=be.get_animation();
fadein=an.get_animations()[1];
fadeout=an.get_animations()[0];

fadein.set_duration(0.5);
fadeout.set_duration(0.5);
}
function onChanging(sender, args)
{
fadein.play();
window.setTimeout("fadeout.play()", 1000);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptLocalization="true" EnableScriptGlobalization="true">
</asp:ScriptManager>
<asp:Image ID="Image1" runat="server"
Height="300"
Style="border: 1px solid black;width:auto"
AlternateText="Blue Hills image" />
<ajaxToolkit:SlideShowExtender ID="slideshowextend1" runat="server"
TargetControlID="Image1" BehaviorID="ss1"
SlideShowServiceMethod="GetSlides" PlayInterval="2000"
AutoPlay="true"
Loop="true" />
<ajaxToolkit:AnimationExtender id="MyExtender" runat="server" BehaviorID="ae" TargetControlID="Image1">
<Animations>
<OnLoad>
<Sequence>
<FadeOut Duration="0" Fps="20" />
<FadeIn Duration="0" Fps="20" />
</Sequence>
</OnLoad>
</Animations>
</ajaxToolkit:AnimationExtender>
</form>
</body>
</html>

Download Sample
Reference

Monday, February 04, 2008

SlideShowExtender Set Current Image Index, Src

I wanted to set the SlideShowExtender current image, i found just one good way to do so using simple java script code

1- Add the SlideShowExtender:

<cc1:SlideShowExtender BehaviorID="behaviorID" ID="SlideShowExtender1" runat="server"
SlideShowServiceMethod="GetSlides" PlayInterval="9000" TargetControlID="imgScreen"
UseContextKey="True" AutoPlay="true" Loop="true">
</cc1:SlideShowExtender>


2- Add the following java script code:

function changeImage(imgUrl, imageIndex){
slider1 = $find("behaviorID");
slider1._currentIndex = imageIndex-1;
slider1.setCurrentImage = imgUrl;
}

kick it on DotNetKicks.com

Friday, February 01, 2008

SlideShowExtender on slide change

How to add an onchange event to the SlideShowExtender?

-After adding your SlideShowExtender, assign the image control to it and setting a BehaviorID

<cc1:SlideShowExtender BehaviorID="behaviorID" ID="SlideShowExtender1" runat="server" SlideShowServiceMethod="GetSlides" PlayInterval="5000" TargetControlID="imgScreen"  UseContextKey="True" AutoPlay="true" Loop="true"></cc1:SlideShowExtender>

-Add the following java script code inside your html code file:

<script language="javascript" type="text/javascript">  
    function pageLoad(){ 
        var slider1;  
        slider1 = $find("behaviorID"); 
        slider1.add_slideChanging(onSlideChanging);  
    }
     function onSlideChanging(sender, args){ 
        currentSlideIndex = args.get_slideIndex();  
        //Do what you want using this index
     }
</script>



kick it on DotNetKicks.com

Get Difference between 2 times in milliseconds

I got that the best class to get the difference between 2 times in .Net framework is System.Diagnostics.Stopwatch class.

Dim sw As New System.Diagnostics.Stopwatch()
sw.Start()
Threading.Thread.Sleep(2)
MessageBox.Show(sw.ElapsedMilliseconds.ToString())

kick it on DotNetKicks.com


Excel file in new excel instance

You can open any excel file using code like this:

Process.Start(filePath);

But what will happen if we have these 2 lines of code:

Process.Start(filePathONE);

Process.Start(filePathTWO);

Will first open “filePathONE” in a new excel instance, then will open the “filePathTwo” in the same excel instance.

What we can do if we want to open each file in a separate new excel instance?

We must write it like that:

Process.Start(“Excel.exe”, filePathONE);

Process.Start(“Excel.exe”, filePathTWO);

It’s very simple, isn’t it?

But we can face a small problem with this way:

If you want to open an excel file that contains space in its name, for example “my Sheet.xls”, it will give you a runtime error that it can’t open files “my.xls” and “Sheet.xls”.

So what can I do?

It’s simple:

Just add “ before and after the file path, just like that:

Process.Start(“Excel.exe”, @“””filePathONE”””);

Like that it will open normally without any errors.

Note:

You will need to do the same for any office application (word, powerpoint, ….).

kick it on DotNetKicks.com

Access splash screen

How to add a splash screen that closes after 10 seconds before my main form starts?

Here is one way:
1. Place the form that has the splash screen in design view and set the following properties:
Timer Interval 6000
On Timer>>>>>>Click the build button to create an event procedure. Place the following code in that procedure:
________________________________________
Private Sub Form_Timer()
On Error GoTo Error_Routine
' Form stays open for 10 seconds, then closes.
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmMainSwitchboard"
Exit_Continue:
Exit Sub
Error_Routine:
MsgBox "Error# " & Err.Number & " " & Err.Description
Resume Exit_Continue
End Sub
______________________________________________
2. Go to Startup properties on the Access Command menu tools>Startup and select the splash screen as the form hat opens at startup. Then test by restarting your application access file.



kick it on DotNetKicks.com

Friday, January 04, 2008

AnimationExtender dynamic TargetControlID

How to make one AnimationExtender which apply on more than one control based on your selection in run time?

There are many solutions available online, some are very complicated and some are not useful.

For example if you want to make something like the messages which appear when you click on password, postal code,... text controls in this yahoo registration page:

https://edit.yahoo.com/registration?.intl=us&new=1&.done=http://mail.yahoo.com&.src=ym&.v=0&.u=47furq93nrtek&partner=&.partner=&pkg=&stepid=&.p=&promo=&.last=

Sure this is not the only way to do the same as in this page, but this is how to do the same using AnimationExtender Ajax ToolKit control.

And Now how to make it:

We want to show an animated different message when we click on different TextBoxs.

1- Don't forget to add the Script Manger before using the AnimationExtender Control

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
2- Then Create the AnimationExtender control and assign any default TargetControlID property because it will not work if its empty.
<cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="TextBox2">

3- Then create the controls you will work on as you can see in the complete page code below.

4- Now the problem that the TargetControlID property can't be dynamic, so what we can do to apply the same Extender to more than one control:

We can make a small work around by adding a hidden field and using javascript we can set this hidden field to the control we need.

Then assign this hidden control value to the AnimationTargetScript:


<cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="TextBox2">
<Animations>

<OnClick>
<Sequence>
<FadeIn AnimationTargetScript="javascript:getTargetControl();" Duration="0.5" Fps="300"/>
</Sequence>
</OnClick>
</Animations>

</cc1:AnimationExtender>
<input type="hidden" id="hid" value="msg1" />


function getTargetControl()
{
  return document.getElementById("hid").value;
}

Then we want to make the function which will start the animation when clicking on a textbox control:
function animate(ele)
{
    $get("Msg1").style.opacity=0;
    $get("Msg2").style.opacity=0;
    $get("hid").value=ele;
    if ($find("AnimationExtender1")!=null)
        {
            var onclkBehavior = $find("AnimationExtender1").get_OnClickBehavior().get_animation();
            onclkBehavior.play();
        }
}
This is the complete page sample:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<!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>Untitled Page</title>
<script language="javascript" type="text/javascript">
  function animate(ele)
  {
$get("Msg1").style.opacity=0;
     $get("Msg2").style.opacity=0;
     $get("hid").value=ele;
     if ($find("AnimationExtender1")!=null)
     {
         var onclkBehavior = $find("AnimationExtender1").get_OnClickBehavior().get_animation();
         onclkBehavior.play();
     }
  }
          
  function getTargetControl()
   {
       return document.getElementById("hid").value;
   }
  18:     
</script>

</head>


<body>
<form id="form1" runat="server">

 <div>
         <asp:ScriptManager ID="ScriptManager1" runat="server">
         </asp:ScriptManager>
         <cc1:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="TextBox2">
            <Animations>
                        <OnClick>
                             <Sequence>
                                 <FadeIn AnimationTargetScript="javascript:getTargetControl();" Duration="0.3" Fps="300"/>
                             </Sequence>
                         </OnClick>
             </Animations>
         </cc1:AnimationExtender>


          <input type="hidden" id="hid" value="msg1" />
         <table style="width: 100%;">
             <tr>
                 <td>
                    <asp:TextBox ID="TextBox1" runat="server" onclick="javascript:animate('Msg1');"></asp:TextBox>
                 </td>
                 <td>
                     <div id="Msg1" style="opacity: 0; left: 781px; top: 662px; color: #FF0000;">
                         THIS IS Message 1
                     </div>
                 </td>
                 <td>
                     &nbsp;
                 </td>
             </tr>
             <tr>
                 <td>
                     <asp:TextBox ID="TextBox2" runat="server" onclick="javascript:animate('Msg2');"></asp:TextBox>
                 </td>
                 <td>
                     <div id="Msg2" style="opacity: 0; left: 781px; top: 662px; color: #00FF00;">
                         THIS IS Message 2
                     </div>
                 </td>
                 <td>
                 </td>
             </tr>
         </table>
     </div>
     </form>
 </body>
 </html>
Now everything is done, you can try and manipulate as you want, you will find it simple.