inserting multiple records into database table from a dynamic populated checkbox list

  • 13 years ago

    Please,  I need help with this.

    I am using c# I am able to retrieve values by simply looping

    string strchklist = "";

    foreach (ListItem li in CheckBoxList1.Items)

    {

    if (li.Selected)

    {

    Response.Write(li.Value);

    strchklist += li.Text +

    " ";

    }

    }

    if (strchklist == "")

    {

    // Response.Write("No item Selected");

    }

    else

    {

    // Response.Write("You selected : " + strchklist);

    }

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.” - Donald Knuth