This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Me And My Respected Teacher Mr Kamal Sheel Mishra

Mr. K.S. Mishra is HOD of Computer Science from SMS Varanasi where I have completed my MCA

Me And My Respected Teacher Mr Udayan Maiti

Mr. Udayan Maiti is a senior .Net Expert and has guided many professionals of multi national Companies(MNC)

Me And My Best Friend Mr Ravinder Goel

Mr. Ravinder Goel is a senior Software Engineer and now he is working Wipro Technology

Friday 20 April 2012

Add Data in Grid View by using footer Template


  Add Data in  Grid View by using footer Template

 A.  Frist  Gridview's property
    1.Showfooter=true;

B.  Go to Gridview's Smarttag and  EditColume-
     Select field   srno then  after click - Convert this field into a template field
C. Gridview's Smarttag  -Edit Template

          Grid View Tasks- select footer template
          after selected  any controle drag in thish tempalate
        ending tempalate editing
     

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
              TextBox t1 = (TextBox)GridView1.FooterRow.FindControl("txtsrno");
              TextBox t2 = (TextBox)GridView1.FooterRow.FindControl("txtname");
             TextBox t3 = (TextBox)GridView1.FooterRow.FindControl("txtfather");

                   SqlDataSource1.InsertParameters["SrNo"].DefaultValue = t1.Text;
                   SqlDataSource1.InsertParameters["Name"].DefaultValue = t2.Text;
                   SqlDataSource1.InsertParameters["Father"].DefaultValue = t3.Text;
                   SqlDataSource1.Insert();
                   GridView1.DataBind();
    }
}