B
Bogdan Zamfir
Hi,
I have a page called MyTargetPage.aspx with a drop down list.
When I pass control to that page, I send an ID in querystring, like this
Server.transfer("MyTargetPage.aspx?PrjID=" & something)
Then in page_load, after I populate the drop-down, I want to make default
selection the item passed in query string
So I use a code like this:
dim MyID as string =Request.QueryString("PrjID")
Dim lo As ListItem, i As Int16
For i = 0 To cmbProject.Items.Count - 1
If cmbProject.Items(i).Value = cProjectID Then
Me.cmbProject.SelectedIndex = i
End If
Next
This works, but doesn't seems to me to be a very elegant solution.
Unfortunately I coudn't found a different one.
Can anyone help with a better suggestion to accomplish this?
Thank you
Bogdan
I have a page called MyTargetPage.aspx with a drop down list.
When I pass control to that page, I send an ID in querystring, like this
Server.transfer("MyTargetPage.aspx?PrjID=" & something)
Then in page_load, after I populate the drop-down, I want to make default
selection the item passed in query string
So I use a code like this:
dim MyID as string =Request.QueryString("PrjID")
Dim lo As ListItem, i As Int16
For i = 0 To cmbProject.Items.Count - 1
If cmbProject.Items(i).Value = cProjectID Then
Me.cmbProject.SelectedIndex = i
End If
Next
This works, but doesn't seems to me to be a very elegant solution.
Unfortunately I coudn't found a different one.
Can anyone help with a better suggestion to accomplish this?
Thank you
Bogdan