News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

Querystring help

Started by Pete, July 20, 2008, 21:30:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pete

Im working in ASPX with VB and Ive got a master page and a load of stuff in a database, and I want to do this but i have lots of possible querystrings, way more than 2 anyway;

http://www.aspwebpro.com/tutorials/asp/passvariableswqs.asp

Its this bit Im interested in:

<%
IF strProducts = "Books" THEN

 Display books here

ELSE

 Display movies here

END IF
%>,

Basically, I want:


<%
IF strProducts = "something that exists in my database" THEN

 Display the *something* here  (in a contentplaceholder)

ELSE

 Display *default stuff* here  (in a contentplaceholder)

END IF
%>,
I know sh*ts bad right now with all that starving bullsh*t and the dust storms and we are running out of french fries and burrito coverings.

FuMaN

Its been so long since I did VB.

Could you not do

IF CheckString(QueryString) "A method which checks if the QueryString you pass in exists in the database.

So you have

Sub CheckString(QueryString as String)

IF QueryString in Database THEN
Return True
ELSE
Return False

Hopefully someone else can clarify that.