Skip to main content

Posts

ASP.NET AJAX UpdatePanel Triggers

Hello everyone,  I'm going to share to code sample for triggers in update panel using asp.net with c# In the 1st step code sample for .aspx view page < asp : Content ID ="BodyContent" runat ="server" ContentPlaceHolderID ="MainContent">     < asp : ScriptManager EnablePartialRendering ="true" ID ="ScriptManager1" runat ="server">     </ asp : ScriptManager >     < asp : UpdatePanel ID ="UpdatePanel1" runat ="server" UpdateMode ="Conditional">         < ContentTemplate >             < asp : Label ID ="Label1" runat ="server"></ asp : Label >             < asp : Button ID ="Button1" runat ="server" Text ="Click Me ?"               ...

Paging in GridView using c# .net

In this post, i'm going to share to code snippet for gridview paging using asp.net with c# This example is simple and understandable code using asp.net with c# In the 1st step, code sample for business logic code in asp.net page i.e. .aspx.cs as given below.   protected void GridView1_PageIndexChanging( object sender, GridViewPageEventArgs e)   {             try             {                 GridView1.PageIndex = e.NewPageIndex;                 GetGroupsList();             }             catch ( Exception ex)             { ...

Create Watermark TextBox using JavaScript in ASP .Net.

Hi everyone, In this post, i'm going to share to code snippet for create watermark in a asp.net textbox using JavaScript. This example is simple and understandable code-sample using JavaScript and asp.net c# Table of Contents 1. In the 1st step, code-sample for aspx page. 2. In the 2nd step, code-sample for C# (.cs page). 3. In the 3rd step, code-sample for JavaScript. In the 1st step , code-sample for view in asp.net page i.e. .aspx < asp : TextBox ID ="txtURL" runat ="server" Width ="300px" Text = "http://aspdotnetblogspot.blogspot.in/"   onblur = "WaterMarktext(this, event);" onfocus = "WaterMarktext(this, event);"> </ asp : TextBox > In the 2nd step , code-sample for c# .net page i.e. .aspx.cs if (! Page .IsPostBack) {     txtURL.Attributes.Add( "onblur" , "WaterMarktext(this, event);" );     txtURL.Attributes.Add( "onfocus" , ...

Hide Gridview column at Runtime in ASP .net.

Hello Everyone, In this post going to share to code-sample for the hide gridview column at run-time using  asp.net  with c# Table of Contents 1. In the 1st steps, code-sample for collection class for returns dataSet. 2. In the 2nd steps, code-sample for bind the grid view and hide row from grid view at the run time. In the step 1st /// <summary> /// Collection Class is used to return dataset. /// </summary> public class CollectionClass {     /// <returns> DataSet </returns>     public DataSet GetVideofile()     {         DataSet dsVideo = null ;         string spNamehere = "sp_getCWVideos" ;         Hashtable paramTable = new Hashtable ();         dsVideo = System.Web.DataAccess.ExecuteSP(spNamehere, paramTablehere); ...

row index in gridview in c#- Gridview Row index at Runtime

Hello everyone, I'm going to share the code-sample of row index in gridview in c# .net  using on click of link-button and image button. Table of Contents 1.  On click link button find  gridview row index in C#. 2.  On click Image button  find  gridview row index in C#. Note: Image is a Temple field item, we create a click and then generate the events of on row and get the index. Using the line of code [ int index = ((( LinkButton )sender).Parent.Parent as GridViewRow ).RowIndex; ] and then get the Cell values with using index. i.e. [ string strFilePath = GridViewId.Rows[index].Cells[1].Text; ] For more details you can seen the below example. 1. Row index in gridview (On click link button) protected void lkbVideo_Click( object sender, EventArgs e) {     int index = ((( LinkButton )sender).Parent.Parent as GridViewRow ).RowIndex;     string strFilePath = GridViewId.Rows[index].Cells[1].Te...

Date Calendar in ASP.NET TextBox with image icon

Hello everyone,  In this post, i'm going to share the code-sample for   date calendar date-time calender textbox in asp.net with c# This example is simple and   easily understandable code   using asp.net with c#   Table of Contents  1. In the 1st step, code-sample for C# (.cs page) 2. In the 2nd step, code-sample for aspx page In the 1st step , we write the code for the cs file in asp.net page i.e. .aspx.cs namespace   myWebApplication {       public   partial   class   _Default   : BaseFeature     {           protected   void   Page_Load( object   sender,   EventArgs   e)         {             CalOne.Visible =   false ;             CalTwo.Visible =   fa...