Here's my setup:
I have a web control, Criteria.ascx, that contains a form used to enter search criteria. The user fills in data for the fields they want to search on. Some are text boxes and some are dropdown lists.
When the form is submitted it loads the Search.aspx page. This is the page that will display the results of the search. This page has VB code behind:
[blue]
Dim strDAUser As String
Dim strIssueId As String
[green]'This is a combo box[/green]
If Len(Request.Params("cboDAUser")) > 0 Then
strDAUser = Request.Params("cboDAUser")
End If
[green]'This is a text box[/green]
If Len(Request.Params("txtIssueId")) > 0 Then
strIssueId = Request.Params("txtIssueId")
End If
[green]'Pass Search form parameters to PDMRequest.vb function[/green]
MyList.DataSource = oReqDB.GetResults(strDAUser, strIssueId)
MyList.DataBind()
[green]'Display a message to indicate results of search[/green]
If MyList.Items.Count = 0 Then
ResultMsg.Text = "No requests found in your search."
Else
ResultMsg.Text = "Your search returned " & _
MyList.Items.Count & " records."
End If
[/blue]
When stepping through the code the "cboDAUser" always equals nothing. How do I capture the value assigned to the combo box when a selection is made?
I have a web control, Criteria.ascx, that contains a form used to enter search criteria. The user fills in data for the fields they want to search on. Some are text boxes and some are dropdown lists.
When the form is submitted it loads the Search.aspx page. This is the page that will display the results of the search. This page has VB code behind:
[blue]
Dim strDAUser As String
Dim strIssueId As String
[green]'This is a combo box[/green]
If Len(Request.Params("cboDAUser")) > 0 Then
strDAUser = Request.Params("cboDAUser")
End If
[green]'This is a text box[/green]
If Len(Request.Params("txtIssueId")) > 0 Then
strIssueId = Request.Params("txtIssueId")
End If
[green]'Pass Search form parameters to PDMRequest.vb function[/green]
MyList.DataSource = oReqDB.GetResults(strDAUser, strIssueId)
MyList.DataBind()
[green]'Display a message to indicate results of search[/green]
If MyList.Items.Count = 0 Then
ResultMsg.Text = "No requests found in your search."
Else
ResultMsg.Text = "Your search returned " & _
MyList.Items.Count & " records."
End If
[/blue]
When stepping through the code the "cboDAUser" always equals nothing. How do I capture the value assigned to the combo box when a selection is made?