In my ASP.NET application, there is a main.aspx which includes heavy grid data.
In order to display Google Maps in main.aspx, I’ve made a map.aspx page which is given as frame reference in main.aspx.
Now, I want to pass coordinates and some description from main.aspx to map.aspx.
Length of query string is more than 5000 charachters, so setting “src” of frame at javascipt fails because of this length.
How can I send data from main.aspx to map.aspx without using query string?
Well, I can see two alternatives:
Store the value you want to pass to the iframe page in a
Sessionvariable, then retrieve it inPage_Loadevent of map.aspx.Use global variables in Javascript:
Define the variables in main.aspx. You can set these variables using
ScriptManager.RegisterStartupScript, if you need to define them at server side:Then you can read them in map.aspx:
I have tested the second solution in IE 7+, Firefox, Safari, Opera and Google Chrome.