8html, body { 9height: 100%;10overflow: auto;11}12 13body {14padding: 0;15margin: 0;16}17 18#silverlightControlHost {19height: 100%;20tex。silverlight|silverlight 用户浏览器未安装SL插件问题。" />

silverlight|silverlight 用户浏览器未安装SL插件问题

1.在Silverlight启动页面
silverlight|silverlight 用户浏览器未安装SL插件问题
文章图片
silverlight|silverlight 用户浏览器未安装SL插件问题
文章图片

1 2 3 4 5 6SilverlightApplication9 - 锐客网 7"text/css"> 8html, body { 9height: 100%; 10overflow: auto; 11} 12 13body { 14padding: 0; 15margin: 0; 16} 17 18#silverlightControlHost { 19height: 100%; 20text-align: center; 21} 22 23 24 25 61 62 63
64"silverlightControlHost"> 65 66"source" value="https://www.it610.com/article/ClientBin/SilverlightApplication9.xap" /> 67"onError" value="https://www.it610.com/article/onSilverlightError" /> 68"initParams" value="" /> 69"background" value="https://www.it610.com/article/white" /> 70"minRuntimeVersion" value="https://www.it610.com/article/5.0.61118.0" /> 71"autoUpgrade" value="https://www.it610.com/article/true" /> 72"/DownloadSilverlight.aspx" style="text-decoration: none"> 73silverlight|silverlight 用户浏览器未安装SL插件问题
文章图片
75 76
77 78 79
80 81

View Code 2.在Silverlight.web服务端添加要显示的图片及路径、silverlight插件的两个版本(32位、64位)
3.在silverlight.web服务端添加DownloadSilverlight.aspx项
silverlight|silverlight 用户浏览器未安装SL插件问题
文章图片
silverlight|silverlight 用户浏览器未安装SL插件问题
文章图片
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.UI; 6 using System.Web.UI.WebControls; 7 8 namespace SilverlightApplication9.Web 9 { 10public partial class DownloadSilverlight : System.Web.UI.Page 11{ 12protected void Page_Load(object sender, EventArgs e) 13{ 14//string info = "客户端IP:" + Page.Request.UserHostAddress; 15//info += "
用户信息:" + Page.User; 16//info += "
服务器电脑名称:" + Page.Server.MachineName; 17//info += "
当前用户电脑名称:" + System.Net.Dns.GetHostName(); 18//info += "
当前电脑名:" + System.Environment.MachineName; 19//info += "
当前电脑所属网域:" + System.Environment.UserDomainName; 20//info += "
当前电脑用户:" + System.Environment.UserName; 21//info += ""; 22//info += "
浏览器类型:" + Request.Browser.Browser; 23//info += "
浏览器标识:" + Request.Browser.Id; 24//info += "
浏览器版本号:" + Request.Browser.Version; 25//info += "
浏览器是不是测试版本:" + Request.Browser.Beta; 26////info += "
浏览器的分辨率(像素):" + Request["width"].ToString() + "*" + Request["height"].ToString(); //1280/1024 27//info += ""; 28//info += "
客户端的操作系统:" + Request.Browser.Platform; 29//info += "
是不是win16系统:" + Request.Browser.Win16; 30//info += "
是不是win32系统:" + Request.Browser.Win32; 31//Response.Write(info); 32 33//int loop1, loop2; 34//NameValueCollection coll; 35 36//// Load ServerVariable collection into NameValueCollection object. 37//coll = Request.ServerVariables; 38//// Get names of all keys into a string array. 39//String[] arr1 = coll.AllKeys; 40//for (loop1 = 0; loop1 < arr1.Length; loop1++) 41//{ 42//Response.Write("Key: " + arr1[loop1] + "
"); 43//String[] arr2 = coll.GetValues(arr1[loop1]); 44//for (loop2 = 0; loop2 < arr2.Length; loop2++) 45//{ 46//Response.Write("Value " + loop2 + ": " + Server.HtmlEncode(arr2[loop2]) + "
"); 47//} 48//} 49//Response.End(); 50if (Request.ServerVariables["HTTP_USER_AGENT"].ToString().Contains("WOW64")) 51{ 52Response.Redirect("/Silverlight/Silverlight_x64.exe"); 53} 54else 55{ 56Response.Redirect("/Silverlight/Silverlight.exe"); 57} 58} 59} 60 }

View Code

【silverlight|silverlight 用户浏览器未安装SL插件问题】转载于:https://www.cnblogs.com/zxbzl/p/3836334.html

    推荐阅读