【发布时间】:2015-01-06 14:38:19
【问题描述】:
运行两次或更多次后,它会给出像 Empty "" 这样的值或什么都没有。 怎么做? 我的第一页 aa.aspx 我做了 在 javascript 中
function InitializeRequest(path) {
// call server side method
PageMethods.SetDownloadPath(path);
}
背后的代码
[System.Web.Services.WebMethod]
public static string SetDownloadPath(string strpath)
{
Page objp = new Page();
objp.Session["strDwnPath"] = strpath;
return strpath;
}
aspx 页面
<asp:ScriptManager EnablePageMethods="true" ID="MainSM" runat="server" ScriptMode="Release" LoadScriptsBeforeUI="true">
如何将 strpath 值转换为后面的 bb.aspx vb 代码???
【问题讨论】:
-
在
WebMethod中使用Session不需要创建Page对象
标签: javascript c# asp.net vb.net