Asp.net checkboxlist update database


















Correct me if my understanding is wrong. The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Web Forms. Sign in to vote.

User posted Hi, Im working on small appplication i have two webforms webform1 and webform2. StoredProcedure; sqlCmd. QueryString["ID1"] ; sqlCmd. SelectedValue ; sqlCmd. Active 6 years, 9 months ago. Viewed times. Create table tblInterest Id int primary key identity, UserId varchar 10 , Athletics varchar 1 default 0, Cycling varchar 1 default 0, EquestrianSports varchar 1 default 0, MotorSports varchar 1 default 0, Marathon varchar 1 default 0, Volleyball varchar 1 default 0, Tennis varchar 1 default 0, Badminton varchar 1 default 0, Basketball varchar 1 default 0 UserId comes from a label and a new row is generated as soon as new user is generated with default value 0 for all hobbies.

RelatedRhymes RelatedRhymes 6 6 silver badges 25 25 bronze badges. Your database design is simply wrong. You should drop tblInterest and create a new table with just a user id and a hobby id.

Add a comment. Active Oldest Votes. Seventh Son Seventh Son 6 6 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. The content you requested has been removed. Ask a question.

Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Getting Started with ASP. NET question on a topic that's not covered by one of the other more specific forums - ask it here.

Sign in to vote. User posted I am creating a webpage using ASP. Monday, April 25, PM. User posted Hi , as all are suggesting its not good practice to store all interests in single column but you can do it like this For Inserting selected values in database. Empty; foreach ListItem item in this. Items if item. ExecuteNonQuery ; cn. ExecuteReader ; if dr. Split ',' ; foreach ListItem item in this. Please Mark as Answer if it Helps You.

Tuesday, April 26, AM.



0コメント

  • 1000 / 1000