Posts

Showing posts from 2014

Move cursor on next control on complete filled

Image
Move cursor on next control on complete filled < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title ></ title >     < script type ="text/javascript">         function ChangeControl(CurrentControl, NextControl) {             debugger ;             if (CurrentControl.value.length >= CurrentControl.maxLength) {                 document.getElementById(NextControl).focus();             }         }     </ script >     < style type ="text/css">         .txtwidth     ...

Convert first letter of word to Capital

Image
Convert first letter of word to Capital < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title ></ title >     < script type ="text/javascript" language ="javascript">         function FirstCaps(id) {             var txt = document.getElementById(id);             txt.value = txt.value.replace(/\w\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });         }     </ script > </ head > < body >     < form id ="form1" runat ="server">     < div >         < asp : TextBox ID ="TextBox1" runat ="server" onkeyup ="FirstCaps(this.id)"...

Create Alphabetic control and fetch its value on click in Asp.net c#

Image
Create Alphabetic control and fetch its value on click in Asp.net c# Step 1:Desgin web form .aspx page < form id ="form1" runat ="server">     < div >         < asp : Panel ID ="pnlAlphabate" runat ="server" Style =" border-color : Black; border-width : 1px;             border-style : solid; width : 200px; margin-bottom : 20px;">         </ asp : Panel >     </ div >     </ form > Step 2:Logic on .Cs page protected void Page_Load( object sender, EventArgs e)     {                string str = "A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, ALL" ;         string [] spt = str.Split( ',' );  ...

While loop with comma separated values in sql server

  While loop with comma separated values in sql server DECLARE @valueList varchar ( 8000 ) DECLARE @pos INT DECLARE @len INT DECLARE @value varchar ( 8000 ) SET @valueList = 'sam,delhi,kandy,' set @pos = 0 set @len = 0 WHILE CHARINDEX ( ',' , @valueList , @pos + 1 )> 0 BEGIN     set @len = CHARINDEX ( ',' , @valueList , @pos + 1 ) - @pos     set @value = SUBSTRING ( @valueList , @pos , @len )             PRINT @value     set @pos = CHARINDEX ( ',' , @valueList , @pos + @len ) + 1 END

How Can find Master page control on Derived Page in Asp.net

How Can find Master page control on Derived Page in Asp.net Logic On Derived Page :- Label lblHeading = this .Master.FindControl( "lblHeading" ) as Label ;                 if (lblHeading != null )                     lblHeading.Text = "Kandy" ;

MS Captcha with refresh button in asp.net

Image
MS Captcha with refresh button in asp.net Step 1: Design web from .aspx Page < form id ="form1" runat ="server">     < div >         < asp : ScriptManager ID ="sm" runat ="server">         </ asp : ScriptManager >         < asp : UpdatePanel ID ="up1" runat ="server">             < ContentTemplate >                 < cc1 : CaptchaControl ID ="Captcha1" runat ="server" CaptchaBackgroundNoise ="Low" CaptchaLength ="6"                     CaptchaHeight ="80" CaptchaWidth ="350" CaptchaLineNoise ="None" CaptchaMinTimeout ="5"          ...

Change Tab order of controls inside Gridview

Image
Change Tab order of controls inside Gridview Normally tab order for controls inside Gridview is always next from its previous control . But in some scenario if you want to change tab order according to your requirement,you can use this approach.   Step 1: Design Web form .aspx page < div >         < asp : GridView ID ="gv" runat ="server" AutoGenerateColumns ="false"             BorderWidth ="0" GridLines ="None" CssClass ="w100p grid form" OnRowDataBound ="gv_RowDataBound"       AlternatingRowStyle-BackColor ="WhiteSmoke">             < HeaderStyle BackColor ="#3366ff" Font-Bold ="true" ForeColor ="White" />             < Columns >              ...

Count Number of Online user in Asp.net Application.

Image
Count Number of Online user in Asp.net Application. For getting count of User in your application, you need to add Global.aspx File in your project. After adding Global file just follow these simple 4 steps. Step 1:- Application setting code in Global.asax Global.asax <% @ Application Language ="C#" %> <% @ Import Namespace ="Telerik_controls_test" %> < script RunAt ="server">     void Application_Start( object sender, EventArgs e)     {         // Code that runs on application startup         Application[ "usercount" ] = 0;     }     void Application_End( object sender, EventArgs e)     {         //  Code that runs on application shutdown     }     void Application_Error( object sender, EventArgs e...