Click here to Skip to main content
15,917,565 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Error Pin
arkiboys18-Feb-10 22:01
arkiboys18-Feb-10 22:01 
GeneralRe: Error Pin
arkiboys18-Feb-10 22:14
arkiboys18-Feb-10 22:14 
GeneralRe: Error Pin
Brij18-Feb-10 22:43
mentorBrij18-Feb-10 22:43 
QuestionCheck duplicate before inserting in database [modified] Pin
Mogamboo_Khush_Hua18-Feb-10 19:45
Mogamboo_Khush_Hua18-Feb-10 19:45 
AnswerRe: Check duplicate before inserting in database Pin
Pranay Rana18-Feb-10 20:17
professionalPranay Rana18-Feb-10 20:17 
GeneralRe: Check duplicate before inserting in database Pin
Mogamboo_Khush_Hua18-Feb-10 21:18
Mogamboo_Khush_Hua18-Feb-10 21:18 
GeneralRe: Check duplicate before inserting in database Pin
Brij18-Feb-10 22:02
mentorBrij18-Feb-10 22:02 
AnswerRe: Check duplicate before inserting in database Pin
Viral Upadhyay18-Feb-10 20:35
Viral Upadhyay18-Feb-10 20:35 
GeneralRe: Check duplicate before inserting in database Pin
Mogamboo_Khush_Hua18-Feb-10 21:17
Mogamboo_Khush_Hua18-Feb-10 21:17 
GeneralRe: Check duplicate before inserting in database Pin
Viral Upadhyay19-Feb-10 0:22
Viral Upadhyay19-Feb-10 0:22 
AnswerRe: Check duplicate before inserting in database Pin
Anurag Gandhi18-Feb-10 23:31
professionalAnurag Gandhi18-Feb-10 23:31 
Questionhow to pass parameter from the main report to subreport based on the primary using report viewer + asp.net with C# Pin
Victoriya Raj18-Feb-10 18:32
Victoriya Raj18-Feb-10 18:32 
Questioncrystal report Pin
shanthi jothi18-Feb-10 18:20
shanthi jothi18-Feb-10 18:20 
AnswerRe: crystal report Pin
Arnalyn19-Feb-10 0:31
Arnalyn19-Feb-10 0:31 
QuestionDataSourceSelectArguments Cannot Be Converted to Integer Pin
Sid Childers18-Feb-10 18:18
Sid Childers18-Feb-10 18:18 
QuestionRetrieving checkbox value from db Pin
test-0918-Feb-10 17:55
test-0918-Feb-10 17:55 
using that code im able to insert the check box value
but if i check multiple check box im able to insert only one value to db how ineed to insert for multiple values..
and how do i retrieve that values from db i.e, the check boxes should be checked when i get the values from db..
please help me...

foreach (DataListItem dli in DataList1.Items)        
{
        CheckBox Chk = (CheckBox)dli.FindControl("CheckBox1");
        if (Chk.Checked)
        {
             SqlConnection SqlCnn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
                // SqlDataReader dr;
                SqlCommand SqlCmd = new SqlCommand();
                SqlCmd.Connection = SqlCnn;
                SqlCnn.Open();
                SqlCmd.CommandText = "insert into test(test1) values('"+ck.Text+"')";
                SqlCmd.ExecuteNonQuery();
                SqlCnn.Close();
            break;
        }
        else
        {
            str13 = "you need to check";
        }
}
LblErr.Visible = true;
LblErr.Text = str13;

AnswerRe: Retrieving checkbox value from db Pin
Dinesh Mani18-Feb-10 18:20
Dinesh Mani18-Feb-10 18:20 
GeneralRe: Retrieving checkbox value from db Pin
test-0918-Feb-10 18:33
test-0918-Feb-10 18:33 
GeneralRe: Retrieving checkbox value from db Pin
Dinesh Mani18-Feb-10 18:36
Dinesh Mani18-Feb-10 18:36 
GeneralRe: Retrieving checkbox value from db Pin
test-0918-Feb-10 18:41
test-0918-Feb-10 18:41 
GeneralRe: Retrieving checkbox value from db Pin
Dinesh Mani18-Feb-10 19:13
Dinesh Mani18-Feb-10 19:13 
GeneralRe: Retrieving checkbox value from db Pin
test-0918-Feb-10 19:24
test-0918-Feb-10 19:24 
GeneralRe: Retrieving checkbox value from db Pin
Dinesh Mani18-Feb-10 19:29
Dinesh Mani18-Feb-10 19:29 
GeneralRe: Retrieving checkbox value from db Pin
test-0918-Feb-10 19:35
test-0918-Feb-10 19:35 
GeneralRe: Retrieving checkbox value from db Pin
Dinesh Mani18-Feb-10 19:43
Dinesh Mani18-Feb-10 19:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.