解决FLASH在Firefox中Session问题
可以利用SessionId在查找Session解决问题
Global.asax 文件中,添加如下代码
void Application_BeginRequest(object sender, EventArgs e)
{
try
{
string session_param_name = "ASPSESSID";
string session_cookie_name = "ASP.NET_SESSIONID";
if (HttpContext.Current.Request.Form[session_param_name] != null)
{
UpdateCookie(session_cookie_name, HttpContext.Current.Request.Form[session_param_name]);
}
else if (HttpContext.Current.Request.QueryString[session_param_name] != null)
{
UpdateCookie(session_cookie_name, HttpContext.Current.Request.QueryString[session_param_name]);
}
}
catch (Exception)
{
}
try
{
string auth_param_name = "AUTHID";
string auth_cookie_name = FormsAuthentication.FormsCookieName;
if (HttpContext.Current.Request.Form[auth_param_name] != null)
{
UpdateCookie(auth_cookie_name, HttpContext.Current.Request.Form[auth_param_name]);
}
else if (HttpContext.Current.Request.QueryString[auth_param_name] != null)
{
UpdateCookie(auth_cookie_name, HttpContext.Current.Request.QueryString[auth_param_name]);
}
}
catch (Exception)
{
}
}
void UpdateCookie(string cookie_name, string cookie_value)
{
HttpCookie cookie = HttpContext.Current.Request.Cookies.Get(cookie_name);
if (cookie == null)
{
cookie = new HttpCookie(cookie_name);
HttpContext.Current.Request.Cookies.Add(cookie);
}
cookie.Value = cookie_value;
HttpContext.Current.Request.Cookies.Set(cookie);
}
请求页面需要传递参数
Server.UrlEncode(string.Format("?OrderId={0}&ASPSESSID={1}", OrderId, Session.SessionID))
Server.UrlEncode是必须的,在flash里使用&的非法的,必须要进行一次URL编码
相关文档:
在网页中怎样给已发布的FLASH添加链接
解决思路:
因为网页中的 Flash 是以控件形式出现的,优先级别较高,所以直接对它加链接是无效的,不过可以用按钮控件 BUTTON 来实现。
具体步骤
1.直接在按钮上加上onClick事件打开指定页面:
<button style="width ......
version: 1.0
date:20090721
Author:crifan
Mail:green-waste(At)163.com
上接:【简介】如何编写linux下nand flash驱动-1
http://green-waste.blog.163.com/blog/static/3267767820096221127554/
【读(read)操作过程详解】
以最简单的read操作为例,解释如何理解时序图,以及将时序图
中的要求,转化 ......
由于我的那个《求flash控件的属性及事件方法在C#中》帖子由于我自己的回复超过3次,无法浮出水面了。
今天经过细心的观察网络的例子,明白了一些flash和C#的交互。把经验分享。
例子:
private void axShockwaveFlash1_FSCommand(object sender, &nbs ......