asp.netСÊýµãËÄÉáÎåÈëµÄ·½·¨
1.Ö»ÒªÇó±£ÁôNλ²»ËÄÉá5Èë
¡¡¡¡float f = 0.55555f£»int i =£¨int£©£¨f * 100£©£»f = £¨float£©£¨i*1.0£©/100£»
¡¡¡¡2.±£ÁôN룬ËÄÉáÎåÈë .
¡¡¡¡decimal d= decimal.Round£¨decimal.Parse£¨"0.55555"£©£¬2£©£»
¡¡¡¡3.±£ÁôNλËÄÉáÎåÈë
¡¡¡¡Math.Round£¨0.55555£¬2£©
¡¡¡¡4£¬±£ÁôNλËÄÉáÎåÈë
¡¡¡¡double dbdata = 0.55555£»string str1 = dbdata.ToString£¨"f2"£©£»//fN ±£ÁôN룬ËÄÉáÎåÈë
¡¡¡¡5.±£ÁôNλËÄÉáÎåÈë
¡¡¡¡string result = String.Format£¨"{0£ºN2}"£¬ 0.55555£©£»//2λ
¡¡¡¡string result = String.Format£¨"{0£ºN3}"£¬ 0.55555£©£»//3λ
¡¡¡¡6. ±£ÁôNλËÄÉáÎåÈë
¡¡¡¡double s=0.55555£»result=s.ToString£¨"#0.00"£©£»//µãºóÃ漸¸ö0¾Í±£Áô¼¸Î»
Ïà¹ØÎĵµ£º
»Ã棺
<asp:HiddenField ID="hfdXuHao" runat="server" />
<asp:TreeView ID="tvMenu" runat="server" CssClass="tvStyle" EnableClientScript="false"
& ......
¾ÍÊÇÔÚʹÓÃjmail·¢ËÍÓʼþʱ£¬Ê¹ÓõÄÊÇ×Ô¶¯É¨Ãè¹æ¶¨¼ä¸ôʱ¼ä×Ô¶¯·¢Ë͵ģ¬ÏÖÔÚÊÇÏëʵÏÖÒѾ·¢Ë͵ÄÓʼþ½«²»ÔÙ·¢ËÍ£¬¸÷λ´óϺÔõôʵÏÖ£¬ÇóÖú£¡
Ê×ÏÈÃ÷È·µÄÊÇÔÚÊý¾Ý¿â±íÖв¢Ã»Óбêʶ×Ö¶ÎÀ´±æ±ðÓʼþÊÇ·ñÒѾ·¢ËÍ¡£Èç¹ûÎÒÀ´ÉèÖÃÒ»¸öÈ«¾Ö±äÁ¿À´´æ´¢ÕâЩÒѾ·¢ËÍÓʼþµÄID£¬È»ºóÔÚÔÙ´ÎɨÃèʱÀ´±æ±ðÕâЩIDÊÇ·ñÒѾ´æÔڵķ½Ê½À´Åжϣ¬¸ ......
1¡¢<%=%> ÀïÃæ·ÅµÄ±äÁ¿Ãû£¬È磺
<div>
<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on <%=
DateTime.Now.ToString() %></p>
</div>
Êä³ö½á¹ûΪ£º
Hello World
Welcome to Beginning ASP.NET 3.5 on 2009-11-10 15:53:08
2¡¢ <%#%> ÕâÀïÊÇÊ ......
asp.net ¶ÔxmlÎļþµÄ¶Áд,Ìí¼Ó,ÐÞ¸Ä,ɾ³ý²Ù×÷
ÏÂÃæÓдúÂëµ÷ÊÔÕýÈ·
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using&nb ......
´ò¿ªÐµĴ°¿Ú²¢´«ËͲÎÊý£º
´«ËͲÎÊý£º
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"')
</script>")
½ÓÊÕ²ÎÊý£º
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.Ϊ°´Å¥Ìí¼Ó¶Ô»°¿ò
Button1.Attributes.Add("oncl ......