Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get value from combo box using Request.Params

Status
Not open for further replies.

wtstro

Programmer
Aug 1, 2002
15
US
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?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top