|
| |
|
|
scpigksin
Posts: 8 Joined: 11/19/2007 Status: offline
|
Image Parameter Probelm in ASPX - 12/27/2007 15:27:37
I am working on a site that needs to use the properties of an image to pass a variable to a new page using a hyper link. 1. I place the image on the page. 2. Insert Hyperlink 3. Select the page that I want to link to from the pages and place it in the address. 4. Click on parameters 5. The path shows the page I selected 6. Next I want to add the query string 7. I select add 8. Add Parameter box pops up with the name and value option, THIS IS WHERE I AM LOST. The name I assume should be SchoolID but what should the value be. The field “SchoolID” is on the page and populating other grids and form views with no problem. What I want this link to accomplish is to take that SchoolID and move it to the second page and populated the second page based on the SchoolID. Example Page 1 is http://scfootballhistory.com/Teams/TeamHome.aspx?schoolId=214 hyperlink is on page 1, I want the hyperlink to do this http://scfootballhistory.com/Teams/TeamPlayoffs.aspx?schoolId=214 when the hyperlink is clicked Any help is greatly appreciated.
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: Image Parameter Probelm in ASPX - 12/28/2007 8:36:40
quote:
Add Parameter box pops up with the name and value option, THIS IS WHERE I AM LOST. The name I assume should be SchoolID but what should the value be. It's not done there and generally I do it in the code-behind page (the aspx.vb page if you're using VB). In ASP.NET, it would look something like this: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
HyperLink1.NavigateUrl = "~/Teams/TeamPlayoffs.aspx?schoolId=" & Request.QueryString("schoolId")
End Sub Make sure it's in the Page_Load section and it should pick up the current querystring value for schoolId. Hope it helps.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|