asp.net Ò³ÃæÀàÉú³É¼°´úÂëÒþ²Ø¼¼Êõ
·þÎñÆ÷¶Ë½Å±¾¿é£º
<script runat="server">
int my = 10;
</script>
·ÖÉ¢µÄ½Å±¾
<%= my.ToString() %>
<% Response.Write(my); %>
.aspxÎļþµÄÄÚÈݱ»½âÎöΪÀàµÄ¶¨Ò壬Ȼºó±»±àÒëΪһ¸ö³ÌÐò¼¯£¬·þÎñÆ÷¶Ë½Å±¾¿é¾ßÖ±½Ó¼ÓÈëµ½ÀඨÒåÖУ¬·ÖÉ¢µÄ½Å±¾±»ºÏ²¢³É¸ÃÀàµÄÒ»¸öRender·½·¨£¬¸Ã·½·¨½«ËùÓо²¶¯Ì¬ÄÚÈÝдÈëÏìÓ¦Á÷ÖС£
ʹÓÿؼþ
ʹÓÿؼþչʾ¶¯Ì¬ÄÚÈÝ£¬ÀàËÆռλ·û£¬controls.add,new htmlform()£¬controls.add(_form)£¬ htmlform.add , _kongjian.controls.add("....")
ʹÓÃÊý¾Ý°ó¶¨£º
string[] list = {.......}
.DataSource = list;
.DataBind();
´úÂëÒþ²Ø
1.0 °æ±¾ (srs,inherits)
page——Öмä»ùÀà——.aspxÎļþÉú³ÉµÄÀࣨ±ÜÃâÔÚ.aspxÖмÓÈë´úÂ룩
2.0 °æ±¾(codefile,inherits)
»ù±¾ºÍ1.0Ïàͬ£¬Ê¹Óà partial class Text : System.Web.UI.Page
²»ÐèÒªÏÔʾÉêÃ÷·þÎñÆ÷¿Ø¼þ£¬2.0Ϊ´úÂëÒþ²ØÀàÒþÊÔÉú³ÉÁËÒ»¸ö²¿·ÖÀà
Ïà¹ØÎĵµ£º
1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½Ê½¡£
´ ......
---------------------------------------
Asp.Net,C#,SQL,JS,WCF,AJAX,¹¤×÷Á÷,WPF,MVC,LINQ,Éè¼Æģʽ(¼Ü¹¹)µÈ¼¼ÊõÌÖÂÛ
“ASP.NET(C#)Fans” QQȺ£º96877690
---------------------------------------
²»¹ÜÊÇJ2SE¡¢J2EE»¹ÊÇJ2ME¾´Çë¼ÓÈ룡Eclipse¡¢NetBeans
Java½»Á÷QQ¸ß¼¶ÈºÀ©ÕУº96878255 ......
Page.ResponseÊôÐÔÖ»ÓÐÔÚÒ³Ãæ´úÂëÖУ¬»òÕß˵Ôڼ̳Ð×Ô: System.Web.UI.PageµÄÀàÖвÅÓС£ÆäËû¼´Ê¹using System.Web.UI Ò²ÎÞ·¨Ê¹ÓÃPage.ResponseÊôÐÔ¡£·ñÔò±àÒëʱ±¨´í£ºµ±Ç°ÉÏÏÂÎÄÖв»´æÔÚÃû³Æ"Response"
½â¾ö·½·¨£º¿ÉÒÔÓÃSystem.Web.HttpContext.Current.Res ......
protected void Button2_Click(object sender, EventArgs e)
{
bool ok = true;
string fileName;
fileName = DateTime.Now. ......
¾³£¼ûµ½ÓÐÈË˵ÔÚASP.netÖв»ÒªÊ¹Óö¯Ì¬¿Ø¼þ,ÎÒÏëÖ÷ÒªµÄÔÒòÔÚÓÚʹÓö¯Ì¬¿Ø¼þ»á´øÀ´Ò»Ð©ÎÊÌâ,ÔÚ×öÏîÄ¿µÄ¹ý³ÌÖÐ,ÎÒ½«Óɶ¯Ì¬¼ÓÔؿؼþÒý·¢µÄ×ÜÊÇ×÷ÁËÒ»¸öССµÄ×ܽá.
1 ¡¢ÔÚʹÓÃLoadControl¼ÓÔؿؼþºó,Óû§¿Ø¼þÖеÄijЩ¿Ø¼þ²»ÔÙÏìӦʼþ¡£
Õâ¸öÎÊÌâÖ÷ÒªÊÇÓÉÓÚ½«¿Ø¼þ¼ÓÔØ·ÅÔÚif (!Page ......