Eniga S

Eniga S

  • NA
  • 3
  • 0

Asp.net: How to retrive the DataGrid checkbox value

Feb 23 2006 9:28 PM
hi friends,


     I need One solution ,help me .
------------------------------------------------

CheckBox gold=(CheckBox)e.Item.FindControl("ckGold");

CheckBox silver=((CheckBox)e.Item.FindControl("ckSilver"));

string txt=((TextBox)e.Item.FindControl("txt1")).Text;;

Response.Write(((CheckBox)e.Item.FindControl("ckGold")).Text);

Response.Write(((CheckBox)e.Item.FindControl("ckGold")).Text);

if(gold.Checked==true)

silver.Checked=false;

else if(silver.Checked==true)

gold.Checked=false;

 else

Page.RegisterStartupScript("Statrup","<script>alert('Please Select Any One Status.....');</script>");

------------------------------------------------------
Above code to be displayed one error:'Object Reference to be set an instance of an object'

What's the solution this?

                                                       
Thank u


Answers (1)