Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
combine stringcollection content and webform content in same INSERT INTO
Joe
Mar 4 2010 3:51 AM
2.8k
Reply
Some background:
i am converting an asp application into asp.net. when a team gets nominated they would like to select the whole team (upto 10 members) and enter the nomination details once. at the moment they would have to enter it upto 10 times!! so i have to combine the normal web input with the multi-select or radio buttons. i am getting very frusrated since there is not alot of info on this subject around.
your assistance would be appreciated!!
here is my code so far:
string
sqlStatement =
string
.Empty;
sqlStatement =
"INSERT INTO Table_1 (people) VALUES"
;
sb.AppendFormat(
"{0}('{1}'); "
, sqlStatement, item);
sqlStatement =
"INSERT INTO Table_1 (UserId) VALUES (@Userid)"
;
sb.Append(sqlStatement +
" ;"
);
This now produces two records per person:
Joe Bloggs
NULL
NULL
12235
i need to combine this information:
Joe Bloggs
12235
Thank you so much!!
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
increase textbox height based on text
bind lowest value from table in a textbox