?
Solved

Displaying links from table

Posted on 2007-03-20
11
Medium Priority
?
143 Views
Last Modified: 2010-04-25
I have the following tables:
Category:
------------
ID              Cat
--------------------
1               cat1
2               cat2


Links:
---------
ID              Linkname                Url                        Cat                               Type
------------------------------------------------------------------------------------------------------------
1               L1                           http://u1               cat1                               images
2               L2                           http://u2               cat2                               videos
3               L3                           http://u3               cat1                               videos
4               L4                           http://u4               cat1                               images
5               L5                           http://u5               cat2                               images
.........................................................................................................................................

Now I want to display all the categories cat1, cat2 etc....like this:
cat1: images - videos
cat2: images - videos

if I click on 'images' in 'cat1: images - videos' it should list out all the urls from the 'links' table satisfying the condition cat='cat1' and type='images'. so far I had something like this:

<%=mRs("cat") & ":  " %><a href="showlink.asp?cat=<%=mRs("id")%>&tp=0" style="color:<%=sImg%>">images</a><span>&nbsp;</span><a href="showlink.asp?cat=<%=mRs("id")%>&tp=1" style="color:<%=sVid%>">videos</a><br>

now I want to achieve this without using 'Quesrysting'.

any help is appreciated.


0
Comment
Question by:CWS (haripriya)
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 25

Accepted Solution

by:
kevp75 earned 1000 total points
ID: 18756014
You can't unless you get something like:http://www.isapirewrite.com/

or you could make a custom error page, that will end up doing a redirect...however, you will still need to pass a querystring.  I am afraid a session variable/cookie is an even worse way to do it...

May I ask why you wouldn't want to pass a querystring?
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 18756050
the client feels, QuestionMark '?' results lower search rank and fails in search engines strategies. He is strictly against using querystring.
0
 
LVL 25

Expert Comment

by:kevp75
ID: 18756282
the best thing I can suggest to you then is to use the isapirewrite (link above)

all it does though is mask the URL that is displayed in the address bar of your browser.  Otherwise, you will need to keep your links the way they are...

and just for the record....your client is mistaken.  The QuestionMark would have effected search rankings a few years ago, but it is not that way anymore...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 25

Assisted Solution

by:Rouchie
Rouchie earned 1000 total points
ID: 18762613
Hi cyberwebservice

The technique you seek is called URL ReWriting.  Googling this term returns a lot of ways to potentially achieve what you need.  Apparently if you create a custom 404 page, you can access the page that the user attempted to access, I think by using Request.ServerVariables("HTTP_REFERER")

So you could output

   www.myserver.com/showlink.asp/7

The use the HTTP_REFERER in the 404 page to split the address into an array.  The ID parameter could then be accessed using the last member in the array.

There's some other approaches here...
http://forums.aspfree.com/code-bank-54/url-rewriting-with-asp-iis-102550.html
http://www.seoconsultants.com/articles/1000/urls.asp
http://www.motobit.com/help/url-replacer-rewriter/iis-mod-rewrite.asp
0
 
LVL 25

Expert Comment

by:kevp75
ID: 18763229
exactly...
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 18784599
hmm....thanx Rouchie and kevp75

I am still working on it....i don't know the head and tail of this...should I download some tools for ISAPI?

I don't know where to start this.
0
 
LVL 25

Expert Comment

by:kevp75
ID: 18785245
you could try that IsapiRewrite that I posted above, however I don't know what the limitations are of the trial version.

Your best bet may be to check out those other links above.  They will work you through setting up a custom error page...
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 18806224
Hi kevp75 and Rouchie,

I saw someother method in someother site for urlrewriting and I have adpted it, it works perfectly. Anyway without your help I would not have done this.
thanks and much appreciated :)
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 18806531
Hi cyberwebservice

Can you please post a link to the site you found the solution?  It will come in useful in the future for other people who stumble upon this post!

Thanks for the points.
-- R
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 18806594
yeah... Rouchie, I forgot the website link, anyway I will just google and send it.
0
 
LVL 16

Author Comment

by:CWS (haripriya)
ID: 18806633
here is the link:
http://blog.netnerds.net/2006/04/asp-mod_redirect-or-urlrewrite-with-classic-asp-sorta/

I just used the rewrite.asp part alone after setting the custom 404 error page.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question