I have a function in my global.asa that I would like to call with "newUrl = buildUrl(string1, string2, string3)"<BR><BR>The catch is, buildUrl() is static and makes reference to the session object and request, and it does not like doing that because they are non-static.<BR><BR>I can&#039;t figure out how to reference these objects from within a static function.<BR><BR>help!<BR><BR> public static string buildUrl(string page, string qs, string sessionid)<BR> {<BR> if(sessionid == "") {sessionid=Session.SessionID;}<BR> <BR> // sessionid is a global variable<BR> // for some bizarre reason, IE wouldn&#039;t let thumbnail image links return to a non-clicked style<BR> // by adding a random number at the end of the url, this was fixed. Reason: Unknown<BR> int iNum = randomNum(-100000, 100000);<BR> string sNum = iNum.ToString("{0:0000000000}");<BR><BR> string link = page + ".aspx?sid=" + sessionid + @"&" + qs.Trim() + @"&r=" + sNum;<BR><BR> <BR><BR> foreach (string sKey in Request.QueryString.AllKeys)<BR> {<BR> // param in querystring is not in new string so add it<BR> if(String.Compare(sKey,0,"uid",0,0,true)&#060;0)<B R> {<BR> if(link.IndexOf("&" + sKey, 0) == -1)<BR> {<BR> link += "&" + sKey + "=" + Request.QueryString.Get(sKey);<BR> }<BR> }<BR> }<BR><BR> return link;<BR> }