Basically, I'm trying to get ASP.NET to grab a variable out of the URL and use it to start a javascript function.
The user is viewing an online catalog (built with turn.js, a plugin for jquery), and when a page is clicked, it goes to a webpage with all the products from that catalog page on it. There's a link there back to catalog, but when you go back the catalog starts back at page 1. If I have the link include the page number in the URL (i.e. website.com/catalog.aspx?page=4) when you go back, I believe I can grab that out of the URL and use it to have the catalog turn to that page when it loads.
I usually stick to PHP, so I'm a bit lost here. I just need to write a little code snippet that will grab the page number and fire a javascript function using the number. Is this possible?
EDIT: Code:
Here's what I've got in javascript:
function changePage (pagenumber) {
$("#flipbook").turn("page", pagenumber);
}
The page itself is run by NetworkSolutions, so I can't give you any of the actual code from the webpage. What I came up with so far from looking around the web is this (I hope I'm not doing this completely wrong):
<script runat="server">
void Page_Load (object sender, EventArgs e) {
var pagenumber = Response.QueryString['page'];
}
</script>
I'm not sure if I'm getting the variable correctly, or even what to do with it after that to fire the javascript function. Thanks for any help given!