G
gerryR
Hi All
i have a simple aspx page (vb) that pulls info out of an excel sheet. I'm
trying to pass a condition through a link to narrow down the results.
Basically we have 4 areas and rether than have 4 seperate pages I'd like to
have 4 links instead.
At the min my link is
contacts.aspx?area=north
But my problem is ho do I get that area into my sql statement.
I've tried creating a function in my code behind to return the area
Function passCondition()
Dim link As String
link = Request.QueryString("area")
Return link
End Function
An then pass that function into my sql command in the asp page
SelectCommand="SELECT * FROM [range] Where Province=passCondition()">
But all to no avail, I've tried multiple variations of that and several
alternatives but nothing.
As you can prob tell I'm failry new to all this so really appreciate a point
in the right direction.
Many thanks
gR
i have a simple aspx page (vb) that pulls info out of an excel sheet. I'm
trying to pass a condition through a link to narrow down the results.
Basically we have 4 areas and rether than have 4 seperate pages I'd like to
have 4 links instead.
At the min my link is
contacts.aspx?area=north
But my problem is ho do I get that area into my sql statement.
I've tried creating a function in my code behind to return the area
Function passCondition()
Dim link As String
link = Request.QueryString("area")
Return link
End Function
An then pass that function into my sql command in the asp page
SelectCommand="SELECT * FROM [range] Where Province=passCondition()">
But all to no avail, I've tried multiple variations of that and several
alternatives but nothing.
As you can prob tell I'm failry new to all this so really appreciate a point
in the right direction.
Many thanks
gR