SilverlightÓ¦ÓóÌÐòÖÐÈçºÎ»ñÈ¡ASP.NETÒ³Ãæ²ÎÊý
ÐèÇó
ÈçÏÂÃæµÄÏîÄ¿½á¹¹£¬ÎÒÃÇ»áÔÚDefault.aspxÒ³ÃæÖÐÐèÒª´«µÝÁ½¸öÖµµ½SilverlightTestPage.aspxÒ³Ã棬²¢ÇÒÐèÒªÔÚSilverlightTestPage.aspxÒ³ÃæËùËÞÖ÷µÄSilverlightÓ¦ÓóÌÐòÖлñÈ¡²¢ÏÔʾ£º
1.ÏÈÐÞ¸Äpage µÄ¹¹Ô캯Êý
public Page(string passText)
{
InitializeComponent();
txtPass.Text = passText;
}
ÕâÀï´«µÝ¼¸¸ö²ÎÊý¾ÍÐÞ¸ÄpageµÄ¹¹Ôì²ÎÊýΪ¼¸¸ö
2.È»ºóÐÞ¸ÄApp.xaml.cs
string passText = e.InitParams["passText"];
this.RootVisual = new Page(passText);
ͨ¹ýe.InitParams»ñÈ¡²ÎÊý¼¯ºÏ,È»ºóͨ¹ý¹¹Ô캯Êý°Ñ²ÎÊý´«µÝ¸øpage
3.ÐÞ¸Ädefault.aspxÒ³ÃæµÄÄÚÈÝ
Ö±½Ócopyµ÷ÊÔÒ³ÃæµÄÄÚÈÝ£¬×¢Òâ²»ÒªµôÁË×¢²ásilverlight¿Ø¼þµÄÖ¸Á¾ÍÊÇ<@import...,·ñÔòÔÚdefault.csÀïÃæÕÒ²»µ½xaml1¿Ø¼þ
4.ʣϵľÍÊÇÔÚdefault.csÖд«µÝÄãÒª´«µÝµÄ²ÎÊýÁ˱ÈÈç˵¿Í»§¶ËIP£¬µÈµÈÔÚsilverlightÀïÃæ²»ÄÜÖ±½Ó»ñÈ¡µÄÖµ
string IP=Request.UserHostAddress;
Xaml1.InitParameters ="ip="+IP+""
Èç¹ûÓжà¸ö²ÎÊý ¶ººÅ¸ô¿ª¼´¿ÉÈç Xaml1.InitParameters ="ip="+IP+",userName=aaaaaaa,pwd=123"
×îºóÉèdefaultΪÆðʼҳ£¬±àÒëÔËÐÐ ok ²ÎÊý´«µÝµ½ÁËpageµÄ¹¹Ô캯ÊýÖÐ
¾ÙÀý˵Ã÷£º
ÓÃinitParams param£¬Èç¹û參數Ö»ÓÐÒ»個£¬Æ©Èçvalue="ip="
Èç¹û¶à個則Óöº號¸ô開£¬Æ©Èç value="ip="+IP+",userName=aaaaaaa,pwd=123"
Client¶ËÈçÏÂ
<object id="Xaml1" data="data:application/x-silverlight," type="application/x-silverlight-2-b1" width="400" height="300">
<param name="source" value="ClientBin/SilverlightApplication1.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="onLoad" value="pluginLoaded" />
<param name="background" value="white" />
<param name="initParams" value="ip="+IP+",userName=aaaaaaa,pwd=123" />
<a href="http://go.microsoft.com/fwlink/?LinkID=108182" style="text-decoration: none;">
<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
</a&g
Ïà¹ØÎĵµ£º
ѧϰ×Ô¶¨Òå¿Ø¼þµÄ¿ª·¢²»½ö¿ÉÒÔʹÄ㿪·¢³ö¸üÁé»îµÄϵͳ¸üÖØÒªµÄÊÇËü¿ÉÒÔʹÄã¼ÓÉî¶ÔÒÑÓзþÎñÆ÷¿Ø¼þµÄÀí½â£¬µÃÒÔ¸üÁé»îµÄÓ¦Óá£
½ÏÖ®ÓÚasp£¬asp.netÌṩÁ˸üÇ¿´óµÄ¹¦ÄÜ£¬ÎұȽÏϲ»¶ËüµÄ´úÂë·ÖÀë¼¼ÊõºÍ¶ÔÖîÈçC#¡¢VB.NetµÈÇ¿ÀàÐÍÓïÑÔµÄʹÓã¬ÕâÊÇ´Ó¿ª·¢ÕߵĽǶÈÀ´¿´
µÄ£¬´ÓÓû§µÄ½Ç¶ÈÀ´¿´£¬»á¾õµÃËüËٶȸü¿ì£¬ÔËÐиüÎȶ¨£¬°²È« ......
ÔÚweb¿ª·¢Ê±£¬ÓеÄϵͳҪÇóͬһ¸öÓû§ÔÚͬһʱ¼äÖ»ÄܵǼһ´Î£¬Ò²¾ÍÊÇÈç¹ûÒ»¸öÓû§ÒѾµÇ¼ÁË£¬ÔÚÍ˳ö֮ǰÈç¹ûÔٴεǼµÄ»°ÐèÒª±¨´í¡£
³£¼ûµÄ´¦Àí·½·¨ÊÇ£¬ÔÚÓû§µÇ¼ʱ£¬ÅжϴËÓû§ÊÇ·ñÒѾÔÚApplicationÖдæÔÚ£¬Èç¹û´æÔھͱ¨´í£¬²»´æÔڵĻ°¾Í¼Óµ½ApplicationÖÐ(ApplicationÊÇËùÓÐSession¹²Óеģ¬Õû¸öwebÓ¦ÓóÌÐòΨһµÄÒ ......
1ʲôÊÇͼƬµÁÁ´
ÈÃÎÒÃÇÏÈ·ÖÎöÒ»°ãµÄä¯ÀÀÏÖÏó£¬ÆäÖÐ×îÖØÒªµÄÒ»µã¾ÍÊÇÒ»¸öÍêÕûµÄÒ³Ãæ²¢²»ÊÇÒ»´ÎÈ«²¿´«Ë͵½¿Í»§¶ËµÄ£®Èç¹ûÄãÇëÇóµÄÊÇÒ»¸ö´øÓÐÐí¶àͼƬºÍÆäËüÐÅÏ¢µÄÒ³Ã棬ÄÇô×îÏȵÄÒ»¸öHttpÇëÇó±»´«ËÍ»ØÀ´µÄÊÇÕâ¸öÒ³ÃæµÄÎı¾£¬È»ºóͨ¹ý¿Í»§¶ËµÄä¯ÀÀÆ÷¶ÔÕâ¶ÎÎı¾µÄ½âÊÍÖ´ÐУ¬·¢ÏÖÆäÖл¹ÓÐͼƬ£¬ÄÇô¿Í»§¶ËµÄä¯À ......
°ÑÎÒ×öµÚÒ»´Î×öϵͳʱ¶ÔÖØÌî°´Å¥µÄʵÏּǼÈçÏ£º
µÚÒ»´ÎÓÃImageButton¿ÉÒÔÉèÖñ³¾°Í¼Æ¬£¬È»ºóÔÚºǫ́µÄClickʼþÖÐдÈçÏÂ
this.TxtCallNo.Text = "";
this.TxtCaller.Text = "";
this.TxtTranDate.Text = "";
this.TxtTranLimit.Text = "";
this.TxtTra ......