Buenas, yo que tu lo hacia con una QueryString, es decir pasar parametros por la URL, contruyendo la URL desde código servidor , algo asi
www.tudominio.com/default.aspx?ID=23&Rol=1
o si es un html
www.tuHtml.com/Index.html?ID=23&Rol=1
Luego solo tienes que recuperar los Parametros desde Javascrip, te pego un ejemplo que tengo por mi Wiki.
ejemplo:
-----------------------------------
/*
* param( name )
* Returns the string value associated with name (name is case sensitive). If
* name was not defined in the query string, returns undefined. If multiple
* values were associated with name, returns the first value from the order it
* occurs in the query string.
*
* e.g., QUERY-STRING: "hello=world&hello=hi;foo&barn=yard"
* param('hello') returns "world"
* param('foo') returns undefined
* param('barn') returns "yard"
* param('not there') returns undefined
*/
/*
* params( [ name ] )
* Returns an array of all values associated with name (name is case sensitive).
* If name was not defined in the query string, returns undefined. If name is
* omitted, returns an array of every name in the query string.
*
* e.g., QUERY-STRING: "hello=world&hello=hi;foo&barn=yard"
* params('hello') returns ["world", "hi"]
* params('foo') returns [undefined]
* params('barn') returns ["yard"]
* params('not there') returns undefined
* params() returns ["hello", "foo", "barn"]
*/
String.prototype.urldec = function()
{
return unescape(this.replace(/\+/g, " "));
}
var _param = new Object();
{
var parts = window.location.search.substr(1).split(/[&;]/);
for (var i in parts) {
var pair = parts[i].split(/=/);
var name = pair[0].urldec();
var value = pair[1] != undefined ? pair[1].urldec() : undefined;
if (_param[name] == undefined)
_param[name] = [value];
else
_param[name].push(value);
}
}
function param(name)
{
return _param[name] != undefined ? _param[name][0] : undefined;
}
function params(name)
{
if (arguments.length > 0)
return _param[name];
else {
var pnames = [];
for (var p in _param)
pnames.push(p);
return pnames;
}
}
----------------------------------
Es obligatorio que la redirecciones a un Html? lo digo porque si depende de ti, puedes redireccionarla a un .aspx y capturar desde el código de servidor los parametros de la QueryString.
Un saludo!