Showing posts with label Ajax. Show all posts
Showing posts with label Ajax. Show all posts

Monday, August 31, 2009

Textbox Watermark using Ajaxtoolkit or By Javascript

· 0 comments

Adding Watermark to textbox can be done in two ways:

1) Using Ajax Toolkit:

<asp:TextBox runat="server" id="txtname"/>
<ajaxToolkit:TextBoxWatermarkExtender ID="TBWE2" runat="server"
TargetControlID="TextBox1"
WatermarkText="Type First Name Here"
WatermarkCssClass="watermarked" />

For more information on Ajax Toolkit please visit:
http://www.asp.net/ajax/

2) Using Javascript
:

<asp:TextBox ID=”txtname” runat=”server” Text = “Please Enter your Name here”
onblur = “TextboxWaterMark(this, event);”
onfocus = “TextboxWaterMark(this, event);”>
</asp:TextBox>

<script type = “text/javascript”>
var Text = “Please Enter your text here”;//black

function TextboxWaterMark(txtid, evnt)
{
if(txtid.value.length == 0 && evnt.type == “blur”)
{
txtid.style.color = “set the color you want”;//red
txtid.value = Text;
}
if(txtid.value == Text && evnt.type == “focus”)
{
txtid.style.color = “set the color you want”;
txtid.value=”";
}
}
</script>

To use in code behind :

txtname.Attributes.Add(”onblur”, “TextboxWaterMark(this, event);”);

txtname.Attributes.Add(”onfocus”, “TextboxWaterMark(this, event);”);

Read More......

Sunday, May 31, 2009

Download Cheatsheets - .Net, Sql Server, Php, Regular Expressions, CSS, Ajax,Javascript....

· 0 comments

A cheat sheet or crib sheet is a concise set of notes used for quick reference.

You can download cheatsheets of various technologies like:

.Net

Actionscript

Ajax

Javascript

C#

HTML

Sql Server

CSS

JAVA

PHP

Regular Expressions

MySql

Asp/Vbscript

etc..

from

http://www.addedbytes.com/cheat-sheets/

http://www.cheat-sheets.org/

Read More......

Download Ajax Loading Image

· 0 comments

Since all the Ajax interactions happen behind the scenes asynchronously, the user doesn't understand what's going on: sometimes the user doesn't need to know what's going on (like when you are just reloading some data), but when he presses a button he needs to know that he did the right thing and that something is happening.

So we can show an "ajax loading image" when ajax process is going on..

You can generate these images from:

http://www.ajaxload.info/

You can also download from:

http://mentalized.net/activity-indicators/

Also you can search the google for ajax loading image and you will be able to see lots of images..

Read More......

Wednesday, May 27, 2009

Data Navigation with the ListView & GridView, DataPager and SliderExtender Controls

· 0 comments

Listview - Its a new control in asp.net 3.5, similar to gridview but much more capabilities than gridview..
Also Datapager - a new control in asp.net 3.5 used for data paging.
SliderExtender - a control of ajax toolkit

Combining all these three you can do wonders...

Below is an example of listview with datapager and slider extender

http://mattberseth.com/blog/2007/12/data_navigation_with_the_listv.html

Another example is of gridview with dataper and slider extender

http://www.dotnetcurry.com/ShowArticle.aspx?ID=219

The above links has source code to download, you can also view the live demo and play with the example..

Read More......

Saturday, March 7, 2009

Ajax FAQ’s — For Beginners

· 0 comments

Well while learning ajax i came through this link which is very useful for those who have just started about learning ajax..

http://www.dotnetfunda.com/articles/article239.aspx

Read More......