getting variables from Html pages

G

Guest

Hello all,

I have this idea that might not work, our website is built by someone else
and is a CMS website. There is a page with links to other websites and at the
moment I have created a file for each link, the file is just a .html file
that redirects to the actual website. My links on the page are directed to
the relevant file then my webstats tell me how many times each file has been
loaded, and therfore how many click throughs each link gets.

Eg: href=http://links.website.com/microsoft.html>Visit Microsoft then
microsoft.html is just a file that redirects to microsoft.com.

The problem with this method is that every time a new link is added, I have
to create a new file.

Is there a way to create an Asp.net page that I can send info to and then
the asp.net page record it and forward to the info, for example:

href=http://links.website.com/www.microsoft.com then the asp.net page would
take the www.microsoft.com bit and record it in a database, then forward to
that site. Therefore I would not need to create pages or re write pages, asp
would just say record whatever is sent then forward to it.

Am I making sense? Or is there a better way to record where people go from a
website that is basic html?

Thanks
James
 
S

Scott Roberts

Is there a way to create an Asp.net page that I can send info to and then
the asp.net page record it and forward to the info, for example:

href=http://links.website.com/www.microsoft.com then the asp.net page
would
take the www.microsoft.com bit and record it in a database, then forward
to
that site. Therefore I would not need to create pages or re write pages,
asp
would just say record whatever is sent then forward to it.

How about:

href=http://links.website.com/Redir.aspx?url=http://www.microsoft.com

Then just pick up Request.QueryString["url"] in the Page_Load event and do
whatever.
 
G

Guest

Brilliant

Just what I needed thanks.

James

P.s I needed to change the [] to () in my code



Scott Roberts said:
Is there a way to create an Asp.net page that I can send info to and then
the asp.net page record it and forward to the info, for example:

href=http://links.website.com/www.microsoft.com then the asp.net page
would
take the www.microsoft.com bit and record it in a database, then forward
to
that site. Therefore I would not need to create pages or re write pages,
asp
would just say record whatever is sent then forward to it.

How about:

href=http://links.website.com/Redir.aspx?url=http://www.microsoft.com

Then just pick up Request.QueryString["url"] in the Page_Load event and do
whatever.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top