•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 391,137 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,093 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 2899 | Replies: 0
![]() |
| |
•
•
Join Date: Mar 2007
Posts: 34
Reputation:
Rep Power: 2
Solved Threads: 0
hi..i'm doing my final year project on creating Questionnaires template. i have problem with viewing my OptionLIst. I have 2 dataset..all i want to do is to preview all my Question & Answer..i can view them, but i need to create textboxes or checkboxes besides the OptionList..
can anyone help me? please...i really need your help..
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
Dim questDA As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM Question WHERE SurveyID=83", MyConnection)
Dim surveyDA As SqlDataAdapter = New SqlDataAdapter("SELECT * FROM AnswerList WHERE SurveyID=83", MyConnection)
Dim custDS As DataSet = New DataSet
questDA.Fill(custDS, "Question")
surveyDA.Fill(custDS, "AnswerList")
MyConnection.Close()
Dim custAnswerListrel As DataRelation = custDS.Relations.Add("CustAnswerList", _
custDS.Tables("Question").Columns("QuestionID"), _
custDS.Tables("AnswerList").Columns("QuestionID"))
Dim pRow, cRow As DataRow
Dim radlist As New RadioButtonList
For Each pRow In custDS.Tables("Question").Rows
Response.Write("<br>")
'Response.Write(pRow("QuestionID").ToString())
Response.Write(pRow("QuestionNum").ToString())
Response.Write(pRow("Question").ToString())
Response.Write("<br>")
Response.Write(pRow("QuestionTypeID").ToString())
'suppose if QuestionTypeID="Radio" then the OptionList below should 'be listed wit RadioButton, else if QuestionTypeID="CheckBoxes"
'then the OptionList below should be listed with checkboxes...
Response.Write("<br>")
For Each cRow In pRow.GetChildRows(custAnswerListrel)
Dim li As ListItem = New ListItem(cRow("OptionList"), cRow("OptionID"))
Response.Write(vbTab & cRow("OptionID").ToString())
'Dim li As ListItem = New ListItem(cRow("OptionList"), cRow("OptionID"))
Response.Write(cRow("OptionList").ToString())
Response.Write("<br>")
Next
Next
InitializeComponent()
End Subcan anyone help me? please...i really need your help..
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
- generate drop down list..checkboxes...listbox... (ASP.NET)
- add function of a liked list class (C)
- Using a class to add/delete/show numbers in a Link List (C++)
- How do I edit my 'add/remove programmes' list? (Windows NT / 2000 / XP / 2003)
- Add/Remove Programs List Gone! (Windows 9x / Me)
- Feeding a value in a dropdown list to another dropdown list (PHP)
- Removing an item from head of linked list (C)
Other Threads in the VB.NET Forum
- Previous Thread: LEFT syntax
- Next Thread: context menu


Hybrid Mode