62,041
社区成员
发帖
与我相关
我的任务
分享
(1) 想通过session传过去怎么实现?
APP_Code\
public string getSessionValue(string SessionKey)
{
try
{
return System.Web.HttpContext.Current.Session[SessionKey].ToString();
}
catch
{
return "";
}
}
ASPX_CS\
uclass ipt = new uclass();
Response.Write("1."+ ipt.getSessionValue("ABC") + " <hr>");
Session["ABC"] = " -- ABC:" + DateTime.Now.ToString() + " -- ";
Response.Write("2."+ ipt.getSessionValue("ABC") + " <hr>");
(2) 生成后的excel文件如何提供给用户下载?
System.Web.HttpContext.Current.Response.WriteFile ????
System.Web.HttpContext.Current.Response.Write(...)
System.Web.HttpContext.Current.Response.Flush
?? 试试行不行