J
JJ297
Hello can someone assist me...
I've added two check boxes to my page
<asp:CheckBox ID="ChkYes" runat="server" Text="Yes" /><br />
<asp:CheckBox ID="ChkNo" runat="server" Text="No" /
I have a stored procedure set up to enter in the Yes or No answer.
How do I set that up on the code behind page?
This is what I have thus far, all of the other data on the page is
going into the database now I just need to add the check box value.
The two fields in the Database are called DisplayedQues and
NonDisplayedQues
Dim question As String = TxtQuestion.Text
Dim answer As String = TxtAnswer.Text
Dim conn As New Data.SqlClient.SqlConnection("Data
Source=seb2a54;Initial Catalog=EDCSFAQS;Persist Security
Info=True;User ID=EDCSFAQUser;Password=fax")
Dim cmd As New Data.SqlClient.SqlCommand
With cmd
..Connection = conn 'the connection
..CommandType = Data.CommandType.StoredProcedure
..CommandText = "EnterAdminQuestion"
..Parameters.AddWithValue("@topicid",
CInt(DropDownList1.SelectedItem.Value))
..Parameters.AddWithValue("@quesdate", QuesDate.Text)
..Parameters.AddWithValue("@questions", TxtQuestion.Text)
..Parameters.AddWithValue("@Answer", TxtAnswer.Text)
..Parameters.AddWithValue("@DisplayedQues", what do I put here???)
..Parameters.AddWithValue("@NonDisplayedQues", what do I put here???)
Thanks so much.
I've added two check boxes to my page
<asp:CheckBox ID="ChkYes" runat="server" Text="Yes" /><br />
<asp:CheckBox ID="ChkNo" runat="server" Text="No" /
I have a stored procedure set up to enter in the Yes or No answer.
How do I set that up on the code behind page?
This is what I have thus far, all of the other data on the page is
going into the database now I just need to add the check box value.
The two fields in the Database are called DisplayedQues and
NonDisplayedQues
Dim question As String = TxtQuestion.Text
Dim answer As String = TxtAnswer.Text
Dim conn As New Data.SqlClient.SqlConnection("Data
Source=seb2a54;Initial Catalog=EDCSFAQS;Persist Security
Info=True;User ID=EDCSFAQUser;Password=fax")
Dim cmd As New Data.SqlClient.SqlCommand
With cmd
..Connection = conn 'the connection
..CommandType = Data.CommandType.StoredProcedure
..CommandText = "EnterAdminQuestion"
..Parameters.AddWithValue("@topicid",
CInt(DropDownList1.SelectedItem.Value))
..Parameters.AddWithValue("@quesdate", QuesDate.Text)
..Parameters.AddWithValue("@questions", TxtQuestion.Text)
..Parameters.AddWithValue("@Answer", TxtAnswer.Text)
..Parameters.AddWithValue("@DisplayedQues", what do I put here???)
..Parameters.AddWithValue("@NonDisplayedQues", what do I put here???)
Thanks so much.