Hi,
I have to display the list of all contacts(Name) in a web page with checkboxes to select that.
I am binding data by fetching from the data base using Dataset like below.
chkboxContactList.DataSource = ds;
chkboxContactList.DataTextField = "cName";
chkboxContactList.DataValueField = "CNumber";
chkboxContactList.DataBind();
When user selects a contact using checkbox that should be displayed in Mobile No.'s TextBox(Just like in Way2SMS Group Message) with comma seperated each No.
Iam using a Button, On Clicking it looping through the checkboxes and taking its "value" .
String numbers="";
foreach (ListItem li in chkboxContactList.Items)
{
if (li.Selected)
Numbers += li.Value + ",";
}
txtMobileNo.Text=numbers;
As button is generating Postback, How can i achieve this through Java Script.?
Or any alternative to display the Contact Name,Contact Number & checkbox to select the numbers?
Pls Suggest.