Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SilverlightÓ¦ÓóÌÐòÖÐÈçºÎ»ñÈ¡ASP.NETÒ³Ãæ²ÎÊý

¸ÅÊö
ÔÚ¿ª·¢SilverlightÓ¦ÓóÌÐòʱ£¬ÎÒÃǾ­³£»áÓöµ½ÕâÑùÒ»ÖÖÇé¿ö£¬ÐèÒªÔÚSilverlightÓ¦ÓóÌÐòµÄUserControlÖлñÈ¡ASP.NETÒ³Ãæ²ÎÊý£¬Õâ¸ö²ÎÊý²»Ò»¶¨À´×ÔÓÚµ±Ç°SilverlightÓ¦ÓóÌÐòµÄËÞÖ÷Ò³Ã棬¶øÓпÉÄÜÀ´×ÔÓÚÆäËüµÄASP.NETÒ³Ãæ¡£
±¾ÎÄÎÒÃǼòµ¥µÄ½éÉÜÒ»ÏÂÈçºÎÔÚSilverlightÓ¦ÓóÌÐòÖлñÈ¡ASP.NETÒ³Ãæ²ÎÊý¡£
ÐèÇó
ÈçÏÂÃæµÄÏîÄ¿½á¹¹£¬ÎÒÃÇ»áÔÚDefault.aspxÒ³ÃæÖÐÐèÒª´«µÝÁ½¸öÖµµ½SilverlightTestPage.aspxÒ³Ã棬²¢ÇÒÐèÒªÔÚSilverlightTestPage.aspxÒ³ÃæËùËÞÖ÷µÄSilverlightÓ¦ÓóÌÐòÖлñÈ¡²¢ÏÔʾ£º

ÆäÖÐDefault.aspxÒ³Ãæ¿´ÆðÀ´ÈçÏÂͼËùʾ£º

ÔÚµ¥»÷“Submit”°´Å¥Ê±£¬×ªÏòSilverlightTestPage.aspxÒ³Ã棬²¢´«µÝÁ½¸ö²ÎÊý£¬ÈçÏ´úÂëËùʾ£º
protected void btnSubmit_Click(object sender, EventArgs e)
{
Response.Redirect(String.Format("SilverlightTestPage.aspx?username={0}&email={1}",
this.txtUserName.Text,
this.txtEmail.Text));
}
ʹÓÃInitParams
µÚÒ»ÖÖ·½·¨£¬ÎÒÃÇ×ÔÈ»»áʹÓÃInitParamsÊôÐÔ£¬ÔÚSilverlightËÞÖ÷Ò³Ãæ¼ÓÔØʱ£¬ÎÒÃÇÔÚASPXÒ³ÃæÖлñÈ¡²ÎÊý£¬²¢×÷Ϊ³õʼ»¯²ÎÊý´«µÝ¸øSilverlightÓ¦ÓóÌÐò£¬ÈçÏ´úÂëËùʾ£º
protected void Page_Load(object sender, EventArgs e)
{
this.Xaml1.InitParameters = String.Format("username={0},email={1}",
Request.QueryString["username"],
Request.QueryString["email"]);
}
È»ºóÔÚSilverlightÓ¦ÓóÌÐòµÄUserControlÖÐÉèÖÃÁ½¸öÊôÐÔ£¬ÈçÏ´úÂëËùʾ£º
public String UserName
{
set {
this.lblUserName.Text = value;
}
}
public String Email
{
set {
this.lblEmail.Text = value;
}
}
ÕâÑù¾Í¿ÉÒÔÔÚApplication_StartupʼþÖлñÈ¡³õʼ»¯²ÎÊý£¬²¢´«µÝ¸øUserControl£¬ÈçÏ´úÂëËùʾ£º
private void Application_Startup(object sender, StartupEventArgs e)
{
Page page = new Page();
page.UserName = e.InitParams["username"];
page.Email = e.InitParams["email"];
this.RootVisual = page;
}
ÕâÑùÎÒÃǾÍͨ¹ýInitParamsÀ´ÔÚSilverlightÓ¦ÓóÌÐòÖлñÈ¡µ½ÁËASP.NETÒ³ÃæµÄ²ÎÊý£¬ÔËÐкóЧ¹ûÈçÏÂͼËùʾ£º

ʹÓÃHtmlDocument
ÆäʵÉÏÃæµÄ·½·¨»ñÈ¡ASP.NETÒ³ÃæÖвÎÊýÓÐЩÂé·³£¬ÎÒÃÇ¿ÉÒÔÖ±½ÓʹÓÃHtmlDocument£¬ÔÚHtmlDocumentÖж¨ÒåÁËQueryStringÊôÐ


Ïà¹ØÎĵµ£º

ASP.Net 1.1 ÈçºÎ·¢ËÍ´øÓи½¼þµÄÓʼþ

    Private Sub SendEmail()
        Dim email As System.Web.Mail.MailMessage = New Mail.MailMessage
        Dim emailsmtp As System.Web.Mail.SmtpMail
        Dim emailattch As S ......

ASP.NET¿çÒ³Ãæ´«Öµ¼¼ÇÉ×ܽá


¹ØÓÚÒ³Ãæ´«ÖµµÄ·½·¨£¬Òý·¢Á˺ܶàÌÖÂÛ¡£¿´À´ÓкܶàÈ˹Ø×¢Õâ¸ö£¬ÎÒ¾ÍÎÒ¸öÈ˹۵ã×öÁËЩ×ܽᣬϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1.  ʹÓÃQueryString±äÁ¿
QueryStringÊÇÒ»Öַdz£¼òµ¥µÄ´«Öµ·½Ê½£¬Ëû¿ÉÒÔ½«´«Ë͵ÄÖµÏÔʾÔÚä¯ÀÀÆ÷µÄµØÖ·À¸ÖС£Èç¹ûÊÇ´«µÝÒ»¸ö»ò¶à¸ö°²È«ÐÔÒªÇ󲻸߻òÊǽṹ¼òµ¥µÄÊýֵʱ£¬¿ÉÒÔʹÓÃÕâ¸ö·½·¨¡£µ«ÊǶÔÓÚ´« ......

ÅäÖÃASP.NETƽ̨ʱÓöµ½µÄ¡°·ÃÎÊIISÔªÊý¾Ý¿âʧ°Ü¡±


·ÃÎÊ IIS ÔªÊý¾Ý¿âʧ°Ü¡£
˵Ã÷: Ö´Ðе±Ç° Web ÇëÇóÆڼ䣬³öÏÖδ´¦ÀíµÄÒì³£¡£Çë¼ì²é¶ÑÕ»¸ú×ÙÐÅÏ¢£¬ÒÔÁ˽âÓйظôíÎóÒÔ¼°´úÂëÖе¼Ö´íÎóµÄ³ö´¦µÄÏêϸÐÅÏ¢¡£
Òì³£ÏêϸÐÅÏ¢: System.Web.Hosting.HostingEnvironmentException: ·ÃÎÊ IIS ÔªÊý¾Ý¿âʧ°Ü¡£
ÓÃÓÚÔËÐÐ ASP.NET µÄ½ø³ÌÕÊ»§±ØÐë¾ßÓÐ¶Ô IIS ÔªÊý¾Ý¿â(Èç IIS://se ......

40ÌõASP.NET¿ª·¢Tip

1¡¢ÔÚcompilation Ï£¬ÇëÉèÖÃdebug=false £¬ÈçÏ£º
default Language="c#" debug="false">
2¡¢ÇëʹÓÃServer.Transfer´úÌæResponse.Redirect¡£
3¡¢Ê¹ÓÃValidator¿Ø¼þ£¬ÇëÒª¾­³£¼ì²éPage.IsValid¡£
4¡¢ÇëʹÓÃforeachÑ­»·£¬¶ø²»ÊÇΪ×Ö·û´®µü´úÑ­»·¡£
5¡¢ÇëʹÓÿͻ§¶ËÑéÖ¤·½Ê½(²»ÒªÃ¿´Î¶¼ÔÚ·þÎñ¶ËÑéÖ¤)¡£
6¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ