"I am working in asp.net vb and I am trying to get a variable from the URL and pass it into the select statement of my sql data source. So far I have this and it doesn't work with asp.net.
<%Dim PersonNumId as String
PersonNumID = Request.QueryString("Person")
Dim PersonNum2
PersonNum2 = Convert.ToInt32(PersonNumID)%>
<aspSqlDataSource (other information required) SelectCommand="Select Name From Interests Where ID=@PersonNumID" />
<SelectParameters><asp:QueryStringParameter DefaultValue="<%=PersonNum2%>" DbType=Int32/></SelectParameters
I have tried several different ways of converting it but I need the end result to be the variable that is in the query statement is an int. I am new to this so any advice would be greatly appreciated!