re:
!> were wrong about, but ok. If you look at the original post, the
!> question contained the code...
!> "Dim intProductID As Integer = Trim(Request("productid")) "
See my explanantion of what a simple Request may return.
It may not necessarily return the value of the querystring.
What you both have proposed amounts to sloppy coding.
No offense intended.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en espaņol :
http://asp.net.do/foros/
======================================
"jacerhea" <> wrote in message
news:c5c95b80-18c5-4232-899b-...
On Nov 3, 10:51 am, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
> re:
> !> I'm sorry, but you are in fact wrong
>
> Explain to me what happens if the product id is w2344...
You're arguing a completely different point now than what I said you
were wrong about, but ok. If you look at the original post, the
question contained the code...
"Dim intProductID As Integer = Trim(Request("productid")) "
Based on the original poster's own code, it is going to be an int. If
it is not going to be an int they should use the other piece of code
that I originally provided.
If Not Page.IsPostBack Then
Dim productID As String = Request.QueryString("productID")
If
drpProducts.Items.IndexOf(drpProducts.Items.FindBy Value(productID)) >
-1 Then
drpProducts.SelectedValue = productID
End If
End If