SilverlightÓ¦ÓóÌÐòÖлñÈ¡ASP.NETÒ³Ãæ²ÎÊý
·½·¨Ò»£ºÊ¹ÓÃInitParameters
´«µÝ²ÎÊýÒ³Ãæ:
´«µÝÒ»¸ö²ÎÊý
string url = "index.aspx?UserID=" +userId;
//×î´ó»¯
string refUrl = "<Script>window.self.open('" + url + "', '', 'fullscreen=yes,scrollbar=no,toolbar=no,location=no,status=no, menubar=no, resizable=no', true);</script>";
this.Response.Write(refUrl);
Silverlight Host Ò³Ãæ:
string UserID= Request.QueryString["UserID"].ToString();
//½«²ÎÊý´«µ½Silverlight Àï
this.Xaml1.InitParameters = String.Format("UserID={0}",UserID);
silverlight App.xaml.csÀï
private void Application_Startup(object sender, StartupEventArgs e)
{
// »ñµÃ²ÎÊý
string userId = e.InitParams["UserID"].ToString();
this.RootVisual = new index();
}
·½·¨¶þ £ºÊ¹ÓÃSystem.Windows.Browser.HtmlPage.Document.QueryString
´«µÝ²ÎÊýÒ³Ãæ:
´«µÝÒ»¸ö²ÎÊý
string url = "index.aspx?UserID=" +userId;
//×î´ó»¯
string refUrl = "<Script>window.self.open('" + url + "', '', 'fullscreen=yes,scrollbar=no,toolbar=no,location=no,status=no, menubar=no, resizable=no', true);</script>";
this.Response.Write(refUrl);
Silverlight Host Ò³Ãæ:
ÎÞ
silverlight ³ÌÐòÀï
IDictionary<string, string> paras = System.Windows.Browser.HtmlPage.Document.QueryString;
string UserID = paras["UserID"];
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/YanRocky/archive/2009/06/11/4
Ïà¹ØÎĵµ£º
asp.netϵͳ£¬ÔڵǼ»ò×¢²áʱ³£ÌṩÊý×Ö»ò×Ö·û»ìºÏµÄÑéÖ¤Â룬ÕâÀï½éÉÜÈçºÎ²Ù×÷¡£
1£¬Default Ò³Ãæ
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
& ......
½ñÌìÑо¿ÁËÒ»ÏÂÔÚasp.netÏÂÓÃC#ÓïÑÔѹËõÎļþ£¬ºÍ½âѹÎļþ£¬ÔÚÍøÉϺÃÁ˺þòÅÕÒµ½Ô´´úÂ룬£¬Õæ²»ÈÝÒ×°¡£¡£¡
ÔÚ ASP.NET ÖÐÓÐÁ½¸öÀࣺDeflateStream ºÍ GZipStream ÓÃÓÚ´¦ÀíѹËõºÍ½âѹËõ£¬ÕâÁ½¸öÀà·Ö±ðʹÓõÄÊÇ DEFLATE ºÍ gzip ѹËõËã·¨£¬ÕâÁ½¸öËã·¨±»Ò»Ð©Ñ¹ËõÈí¼þÖ§³Ö£¬±ÈÈç WinRAR ¾ÍÖ§³Ö gzip¡£ÕâÁ½¸öÀàµÄÃû³Æ¿Õ¼ä¾ùΪ£ ......
1:a=10,b=15£¬ÔÚ²»ÓõÚÈý·½±äÁ¿µÄǰÌáÏ£¬°Ña,bµÄÖµ»¥»»
2£ºÒÑÖªÊý×éint[] max={6,5,2,9,7,4,0};ÓÿìËÙÅÅÐòËã·¨°´½µÐò¶ÔÆä½øÐÐÅÅÁУ¬²¢·µ»ØÊý×é
3£ºÇë¼òÊöÃæÏò¶ÔÏóµÄ¶à̬µÄÌØÐÔ¼°ÒâÒ壡
4£ºsessionϲ»¶¶ªÖµÇÒÕ¼Äڴ棬Cookis²»°²È«£¬ÇëÎÊÓÃʲô°ì·¨´úÌæÕâÁ½ÖÖÔʼµÄ·½·¨
5£º¶ÔÊý¾ÝµÄ²¢·¢²ÉÓÃʲô°ì·¨½øÐд¦Àí½ÏºÃ¡£
6 ......
Web.configÎļþÊÇÒ»¸ö±ê×¼µÄXMLÎĵµ£¬ËùÓеÄÅäÖÃÐÅÏ¢¶¼Î»ÓÚ<configuration>±ê¼ÇÄÚ¡£<system.web>±ê¼ÇÄÚÔò°üº¬Á˺ËÐÄASP.NETÅäÖÃÉèÖá£Óû§¿ÉÒÔÔÚVisual Studio.NETÖдò¿ªWeb.configÀ´²é¿´ºÍ±à¼ËüµÄÄÚÈÝ£¬Õâ¸öÎļþÖаüº¬ÁË´óÁ¿µÄ×¢ÊÍÐÅÏ¢£¬Óû§¿ÉÒÔ²ÎÕÕѧϰ¡£ÏÂÃæ½éÉܼ¸¸ö³£Óõıê¼Ç¡£
1. <appSettings> ......
1.
ClientScript.RegisterStartupScript(this.GetType(), "js1", "alert('ɾ³ý³É¹¦');window.location='QuerySortList.aspx';", true);
2.
this.cmdSave.Attributes.Add("onclick", "return f_StringCheck()"); ......