我使用了uploadify插件上传文件
多文件上传,有进度条显示
上传操作写在ashx中
但是我有些值得传递回去,我就放入session
context.Session["xxx"]="aaa";
上传成功跳转到a.aspx中
string str=Session["xxx"];
我在IE中和FF中都可以上传并传递session
在Google浏览器中就出现了错误
URI formats are not supported.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: URI formats are not supported.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
多文件上传,有进度条显示
上传操作写在ashx中
但是我有些值得传递回去,我就放入session
context.Session["xxx"]="aaa";
上传成功跳转到a.aspx中
string str=Session["xxx"];
我在IE中和FF中都可以上传并传递session
在Google浏览器中就出现了错误
URI formats are not supported.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: URI formats are not supported.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
解决方案 »
- 用Microsoft Visual Studio.Net(VS2005/2008)做完的网站,怎么放到IIS上就连接不了数据库了呢
- 讨论一下ASP.NET窗体多个form的问题
- vs2003无法在web服务器上启动调试,大家帮忙解决以下
- 在线等方案~!SOS关于计算时间
- 没有注册接口?,请高手指点迷津
- 关于Response.WRITE的使用
- 这种后台菜单怎实现?
- 100分!asp.net开发的人事系统案例或者其中某些功能部分也行!比如:请假.
- 各位大虾,如何给AspNetPager自定义控件加上一个样式?
- 欢迎大家一起来讨论:如何在ASP.NET中实现多客户端SQL SERVER数据库的互传及更新数据!
- Gridview更新时获取不到控件
- 怎样实现当鼠标移到GridView某一行时,得到该行某列的字段值?
就出错了
但是IE和FF中都可以
Session["xxx"]这个出错,对象未引用
但是IE和FF中都是可以的
所以我很尴尬
求解
帮助啊
但是不保证chrome的open或者跳转页面会刷新页面(相当于新建连接,重建会话)造成session丢失.
(推测而已,没有怎么弄过chrome)因此.可能出错的地方
1.uploadify插件在chrome下表现异常,造成页面跳转不成功
2.你代码的错误,可能url写法不正确,或者跳转动作完成前出错.
上传成功后我跳转到a.aspx
a.aspx中调用session为null
IE和FF中都是正确的
或ajax无刷新上传文件,使用iframe模仿
检查跳转方法
using System.Web.SessionState;public class Handler : IHttpHandler, IRequiresSessionState
不用session来存
那还有其他办法把值从ashx传递到ascx吗?
$('#uploadify').uploadifySettings('script','upload.ashx?opertype=pricedocument&id=' + id);
//点击上传前,动态设置参数;
不是ascx传到ashx
我实在没找到传值方法
顶这个,然后在程序中通过context.Session["aa"]来获取值
using System.Web.SessionState;命名空间显式地实现这个接口,
public class Handler : IHttpHandler, IRequiresSessionState这样做就OK了
在aspx中如何获取呢?