Click here to Skip to main content
15,351,871 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to post a link to a aspx page on my website. The problem is that the link when copied is not followed to the same page on other computers until the correct info is entered. It is a sports site that I am trying to link to. The site asks for the team name and then responds with the stats for that particular team. I want to direct my link to the stats page immeadiatly without any user imput. How can I get the correct url, the url it shows is the same for any team I choose?

well, impossible to say based on this post. If you wrote your code properly, specifying the team on the URL, it would just work. If you are using some other mechanism, like the session, viewstate, etc, to store what team is shown, then it's actually impossible to make it work until you write it properly
The page you are trying to link to is probably a form which asks for the team name and on the post-back displays the information. Because it is a Post operation, the required values are not in the query string of the url. Unless the page can also use a query string parameter to specify the team, I think you are stuck with it working as it is.

That is of course, unless you want to create a HTTP Post with the required information. You could use Firebug or something similar to examine the Post request and recreate it. Check out the System.Net.WebRequest class for details.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900