TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maneesh A N
NA
179
108k
return chklist
Sep 26 2014 12:43 PM
hi
i need to get 'testid' from checkboklist....now there is certain values in chklist
private void btnsave_Click(object sender, EventArgs e)
{
fntestbookinsave();
Class1.connect();
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sda;
sda = new SqlDataAdapter("prcmaxbookid", Class1.con);
DataTable dt = new DataTable();
sda.Fill(dt);
string str=dt.Rows[0][0].ToString();
string retval = string.Empty;
try{
foreach(string item in chkList1.Items)
{
if(item.selected)
{
retval += item.value+ ',';
}
retval.TrimEnd(',');
}
}
catch(Exception)
{
}
return retval;
}
string interests = string.Empty;
foreach (string item in chkList1.CheckedItems)
{
SqlDataAdapter adp = new SqlDataAdapter("prcbookingtestsave", Class1.con);
adp.SelectCommand.CommandType = CommandType.StoredProcedure;
adp.SelectCommand.Parameters.Add("@ibookingid", SqlDbType.Int).Value = str;
//adp.SelectCommand.Parameters.Add("@itestid", SqlDbType.Int).Value =item;
//adp.SelectCommand.Parameters.Add("@itestid", SqlDbType.Int).Value = strr;
DataSet ds = new DataSet();
adp.Fill(ds);
}
MessageBox.Show("TEST BOOKED");
fnclear();
Reply
Answers (
0
)
how to compare two string ?
chklist select id