CheckBox list Count in C# Code Text and Value

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 1920
I have Post the Code
CheckBox list Count in C# Code Text and Value
===================================================
string ChkIt = "";
string ChkItvalue ="" ;
for(int i=0;i<=Chk1.Items.Count-1;i++)
{
if (Chk1.Items[i].Selected==true)
{
ChkIt = ChkIt + " " + Chk1.Items[i].Text;
ChkItvalue =ChkItvalue + " " + Chk1.Items[i].Value;
}
}
Response.Write(" Name : " + ChkIt + "<br>" + " Value :"+ ChkItvalue);

Comments or Responses

Login to post response