Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Actually I have 1 column in sql..with 7 check-boxes as items in asp.net. When the submit button is pressed I need to insert the values corresponding to the selected checkboxes and save it in that particular column.. It should also be for a paricular Login ID. say 1 is d login ID from login table and it should insert the values for that particular ID in other table.. can any1 give me some link or code</big>
Posted
Updated 30-Dec-11 20:22pm
v2
Comments
Technoses 31-Dec-11 1:25am    
what is the actual position of your code or actual problem .. please clearify..
Nihal Hussain 31-Dec-11 1:36am    
I login from 1 id from 1 table. then from that particular id i have to insert values in the second table for that particular id through asp.net using checkbox. then repeat the same procedure other Id's in the login table. I hope you got my point..

insert into table
( col, col2,...)
values( check, check,...)
Where id=login_id


Of course this should be used in a stored procedure or parameterized SQL statement
 
Share this answer
 
Comments
Nihal Hussain 2-Jan-12 0:27am    
can you give the code for checkbox.. Im finding it difficult to write it
[no name] 2-Jan-12 8:36am    
What code? What are you having difficulties with?
Nihal Hussain 4-Jan-12 7:00am    
@Mark Nischalke. when i click on the check box and the press the submit button it should go to the database
[no name] 4-Jan-12 7:17am    
OK, very good. What is preventing you from accomplishing that? What have you tried so far?
save the logedin id in the seesion
Session.Add("id")
Session["id"]= the_id_you_will_use_later
then on the button event that's responsible of submitting the checkbox value
read the id value from the Session exmaple int id=Convert.ToInt32(Session["id"])
 
Share this answer
 
dfgdfgdfgdfgdfgdfgdfgdfgdfgdfg
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900