skip to main | skip to sidebar

Smart Coder

Monday, September 20, 2010

Grid Check box

protected void Button1_Click(object sender, EventArgs e)
{
Label lb1 = new Label();
CheckBox chk1 = new CheckBox();
foreach (GridViewRow grd in GridView1.Rows)
{
chk1 = (CheckBox)grd.FindControl("CheckBox1");
if (chk1.Checked == true)
{
lb1 = (Label)grd.FindControl("Label1");
}
TextBox1.Text = lb1.Text.ToString();
}
}

Posted by codeguru at 11:38 PM

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Total Pageviews

Blog Archive

  • ► 2011 (1)
    • ► January (1)
  • ▼ 2010 (32)
    • ► November (2)
    • ▼ September (30)
      • Important All Code
      • File Upload
      • Grid Check box
      • Grid View Check box with link button click
      • Session Check
      • Catching Html textbox value
      • Code Behind Binding of Dropdown
      • Calculation of date Of birth
      • Red Green Button in gridview (true, False)
      • Row as column
      • /* catching btn argument value */
      • /* Generating Random number using system function */
      • /* Textbox to dorpdownlist*/
      • Data base CASE
      • Query string
      • /****** Convert to Ms word and Excel in one click ...
      • /****** Eneble false a gridview image field ******...
      • /* call calculator from .net */
      • /* Generate Random Numer with a certain range */
      • /* String Format For datetime */
      • /* String Format for Int */
      • /* String Format for Double */
      • /* Sorting Arrays */
      • Take Sql Backup from code behind
      • Replace query in sqlserver
      • /****** Seperate with Comma in DB ************/
      • Imp Sqlquery /* SQL QUERY */
      • dynamic gridview and table
      • Last entered row in sqlserver
      • MixedTrick
Design by: FinalSense