Michael Sterling
asked on
Why am I losing my session variable value
I'm trying to retrieve a session variable value after a call to something like:
string myUrl = "http://localhost:59380/RepoEvalPrintPDF.aspx";
But I'm losing the value, can anyone tell me why and or how to fix this? I've used session variables in the past with no problem, but maybe not when I make this kind of call after setting the value. Any help would be appreciated.
string myUrl = "http://localhost:59380/RepoEvalPrintPDF.aspx";
But I'm losing the value, can anyone tell me why and or how to fix this? I've used session variables in the past with no problem, but maybe not when I make this kind of call after setting the value. Any help would be appreciated.
ASKER
Huseyin:
This is what my code looks like now:
Session["AppraisalNum"] = lblApprNum.Text;
string myUrl = "http://localhost:59380/RepoEvalPrintPDF.aspx";
However, when I get to the RepoEvalPrintPDF.aspx page, my session variable's values is gone.
This is what my code looks like now:
Session["AppraisalNum"] = lblApprNum.Text;
string myUrl = "http://localhost:59380/RepoEvalPrintPDF.aspx";
However, when I get to the RepoEvalPrintPDF.aspx page, my session variable's values is gone.
However, when I get to the RepoEvalPrintPDF.aspx page, my session variable's values is gone.
how do you use it?
you should just use this any time...
Session["AppraisalNum"]
whats the purpose of this code?
it is not stored in session and it is not used...
why you keep posting this line? I am confused...
string myUrl = "http://localhost:59380/RepoEvalPrintPDF.aspx";
it is not stored in session and it is not used...
why you keep posting this line? I am confused...
ASKER
string myLocalVar = Session["AppraisalNum"].To String()
That's how I use it, but the value is gone/null.
That's how I use it, but the value is gone/null.
ASKER
That line is for use within a document convterter tool that I'm using
ASKER
this is the full method
Session["AppraisalNum"] = lblApprNum.Text;
string myUrl = "http://localhost:59380/RepoEvalPrintPDF.aspx?reaprno=999999";
Neevia.docConverter DC = new Neevia.docConverter(); //
string docID = "RepoEvaluationReport" + ".url";
string strCheckStatPage = "";
DC.setParameter("DocumentOutputFormat", "PDF");
DC.setParameter("DocumentOutputFolder", Server.MapPath("."));
DC.setParameter("PDFAutoRotatePage", "All");
int rVal;
rVal = DC.submitURL(myUrl, docID, "");
if (rVal != 0) Response.Redirect("error.aspx?" + rVal);
strCheckStatPage = "checkStatus.aspx?docid=" + docID;
Response.Write("<script>");
Response.Write("window.open('" + strCheckStatPage + "','_blank')");
Response.Write("</script>");
line 3, you assign it...
where do you use it?
also, why your link is like "http://localhost:59380"
what happens if you use
string myUrl = "/RepoEvalPrintPDF.aspx?re aprno=9999 99";
where do you use it?
also, why your link is like "http://localhost:59380"
what happens if you use
string myUrl = "/RepoEvalPrintPDF.aspx?re
ASKER
I attempt to use it in the Page_Load event of my RepoEvalPrintPDF.aspx page. If I use "/RepoEvalPrintPDF.aspx?re aprno=9999 99";
pgwscncld.PNG
pgwscncld.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
session["myUrl"] = "http://localhost:59380/RepoEvalPrintPDF.aspx";
then use it by session["myUrl"]