M
mtelinc
Hi,
i am totally stuck. Here is the scenario
I have an asp.net page(c#), and need to implement the following.
I have a checkbox list that I am generating dynamically.
Based on a certain category, I am displaying the associated fields
already populated in DB. Lets say for examply category is Technology,
and the checkboxes that are pulled are: Software, Hardware, and Testing
(these are "fields")
DataSet dsFields= Field.GetFields("Technology");
foreach (DataRow datarow in dsFields.Tables[0].Rows)
{
cblTechnology.Items.Add(datarow["FieldName"].ToString());
}
Now On click button, I have to get the checked values, and write them
to sql server. My table structure is as follows:
TableCategory
-CategoryId
-CategoryName
TableField
-FieldId
-FieldName
-CategoryId (fk)
Table_User_Field
-Id
-UserId(fk)
-FieldId(fk)
I need to write the c#.net and 2 sql procedures to write the checkbox
values to the db and to read it back
Step1:
-Get selected checkbox values from asp.net page, and wirte them to db,
based on Userid
Step2:
-Based on the UserId and industry, get all the fields for that
industry, and then check all the ones that the User has selected
I need the c# and sql!!
HELP!!!
i am totally stuck. Here is the scenario
I have an asp.net page(c#), and need to implement the following.
I have a checkbox list that I am generating dynamically.
Based on a certain category, I am displaying the associated fields
already populated in DB. Lets say for examply category is Technology,
and the checkboxes that are pulled are: Software, Hardware, and Testing
(these are "fields")
DataSet dsFields= Field.GetFields("Technology");
foreach (DataRow datarow in dsFields.Tables[0].Rows)
{
cblTechnology.Items.Add(datarow["FieldName"].ToString());
}
Now On click button, I have to get the checked values, and write them
to sql server. My table structure is as follows:
TableCategory
-CategoryId
-CategoryName
TableField
-FieldId
-FieldName
-CategoryId (fk)
Table_User_Field
-Id
-UserId(fk)
-FieldId(fk)
I need to write the c#.net and 2 sql procedures to write the checkbox
values to the db and to read it back
Step1:
-Get selected checkbox values from asp.net page, and wirte them to db,
based on Userid
Step2:
-Based on the UserId and industry, get all the fields for that
industry, and then check all the ones that the User has selected
I need the c# and sql!!
HELP!!!