ASP.NETÒ³ÃæµÄCheckBoxList×é¼þ
CheckBoxÑ¡Ôñ×é¼þÊÇÒ»¸ö³ÌÐòÖж¼¾³£µÄ×é¼þ¡£ÔÚ³ÌÐòÉè¼ÆÖÐʹÓõ½¸Ã×é¼þ£¬Ò»°ã¶¼²»»áֻʹÓõ½Ò»¸ö£¬ÍùÍùÊÇÒÔ¶à¸ö´ËÀà×é¼þµÄÐÎʽ³öÏֵġ£ÔÚASP.NETÒ³ÃæÖÐÈç¹ûҪʹÓõ½¶à¸öCheckBox×é¼þ£¬³ýÁËÌí¼Ó¶à¸öCheckBox×é¼þÔÚÒ³ÃæÖÐÖ®Í⣬»¹ÓÐÒ»ÖֱȽϷ½±ãµÄ·½·¨£¬¾ÍÊÇʹÓÃCheckBoxList ×é¼þ¡£CheckBoxList×é¼þÊÇÓÉÒ»×éµÄCheckBox×é¼þ×é³ÉµÄ£¬ÔÚ´Ë×é¼þÖÐCheckBoxÊÇ×öΪÌõÄ¿µÄÐÎʽ³öÏֵģ¬²¢ÇÒ¶Ôÿ¸öÔÚ CheckBoxList×é¼þÖеÄCheckBox¶¼ÓÐÒ»¸öË÷ÒýºÅ£¬ÕâÑùÔÚ³ÌÐòÖо͸üÈÝÒ×À´´¦ÀíÁË¡£
ÕâʱÄã¿ÉÄÜÒªÎÊ£¬Õâ²»ÊǶà´ËÒ»¾Ùô£¬¼ÈÈ»ÓÐÁËCheckBox×é¼þ£¬»¹ÒªCheckBoxList×é¼þ¸Éʲô£¿ÕâÊÇÒòΪÔÚ³ÌÐòÉè¼ÆµÄ¹ý³ÌÖУ¬´¦ÀíCheckBoxList×é¼þÒªÍùÍùÒª±È´¦ÀíCheckBox×é¼þÏà¶ÔÈÝÒ׵ĶಢÇÒÒ²Ã÷Á˵Ķࡣ¾ÙÀýÈçÏ£º
¼Ù¶¨ÓÐÒ»¸öCheckBoxList×é¼þºÍÓÐÊ®¸öCheckBox×é¼þ£¬²¢ÇÒÕâ¸öCheckBoxList×é¼þÊÇÓÉÕâÊ®¸öCheckBox×é¼þ¹¹³ÉµÄ¡£
Ò».ÈçºÎÔÚ´´½¨Ò»¸öCheckBoxList×é¼þ£º
£¼ asp:CheckBoxList runat = "server" id = C1 £¾
£¼ asp:ListItem Value = 1 £¾µÚÒ»¸ö¼ì²é¿ò£¼ /asp:ListItem £¾
£¼ asp:ListItem Value = 2 £¾µÚ¶þ¸ö¼ì²é¿ò£¼ /asp:ListItem £¾
£¼ asp:ListItem Value = 3 £¾µÚÈý¸ö¼ì²é¿ò£¼ /asp:ListItem £¾
.....
×¢ÊÍ£ºÔÚÕâÀï¿ÉÒÔ¼ÓÈëÈô¸É¸ö¼ì²é¿ò
£¼ /asp:CheckBoxList £¾
ÔÚASP.NETÒ³ÃæÖмÓÈëÉÏÃæµÄÓï¾ä£¬¾Í¿ÉÒÔ²úÉúÒ»¸öÃû³ÆΪ"C1"µÄCheckBoxList×é¼þÁË¡£
¶þ.CheckBoxList×é¼þÖо³£Ê¹Óõ½µÄÊôÐÔ£º
1.TextAlignÊôÐÔ£ºÈ¡ÖµÎª£ºLeft¡¢Right¡£Èç¹ûTextAlignµÄֵΪLeftÔòCheckBoxList×é¼þÖеļì²é¿òµÄÎÄ×ÖÔÚÑ¡¿òµÄ×ó±ß£¬Í¬ÀíÈç¹ûTextAlignµÄֵΪRightÔò¼ì²é¿òµÄÎÄ×ÖÔÚÑ¡¿òµÄÓұߡ£
2.SelectedÊôÐÔ£ºÎª²¼¶ûÐÍ£¬Åж¨×é¼þÖеļì²é¿òÊÇ·ñ±»Ñ¡ÖС£
3.RepeatColumnsÊôÐÔ£ºÔÚCheckBoxList×é¼þÖÐÓÐÈô¸É¼ì²é¿ò£¬´ËÊôÐÔÖ÷ÒªÊÇÉ趨ÕâЩ¼ì²é¿òµ½µ×ÓöàÉÙÐÐÀ´ÏÔʾ¡£
4.RepeatDirectionÊôÐÔ£º´ËÊôÐÔµÄÖµ¿ÉΪ£ºVertical¡¢Horizontal¡£µ±É趨ÁËRepeatColumnsÊôÐÔºó£¬É趨´ËÊôÐÔÊÇÈçºÎÅÅÁÐ×é¼þÖеĸ÷¸ö¼ì²é¿òµÄ¡£¾ßÌåÈçÏ£º
¼Ù¶¨CheckBoxList×é¼þÓÐËĸö¼ì²é¿ò£¬²¢ÇÒRepeatColumnsÊôÐÔֵΪ2¡£
1).Èç¹ûRepeatDirection £½ Vertical£¬ÔòÔÚÒ³ÃæÖмì²é¿òµÄÏÔʾ·½Ê½ÈçÏ£º
¼ì²é¿ò01 ¼ì²é¿ò03
¼ì²é¿ò02 ¼ì²é¿ò04
2).Èç¹ûRepeatDirection £½ Horizontal£¬ÔòÔÚÒ³ÃæÖмì²é¿òµÄÏÔʾ·½Ê½ÈçÏ£º
¼ì²é¿ò01 ¼ì²é¿ò02
¼ì²é¿ò03 ¼ì²é¿ò04
5.CountÊôÐÔ£º·µ»ØCheckBoxList×é¼þÖÐÓжàÉÙ¼ì²é¿ò¡£
È
Ïà¹ØÎĵµ£º
Ò»£ºasp.netÔõôÁ¬½ÓmysqlÊý¾Ý¿â
ÏÂÔØmysql connectionµÄ¶«Î÷
http://dev.mysql.com/downloads/connector/net/6.2.html
ÓÐ3¸ödownloadÑ¡µÚÒ»¸öÏÂÔØ
Windows (x86, 32-bit), ZIP Archive
mysql-connector-net-6.2.2-noinstall.zip ......
а汾URL-rewrite module for IIS 7.0µÄ·¢²¼ÁË£¬ASP.NET Routing×é¼þËæ×Å.NET Framework 3.5 SP1µÄ·¢²¼£¬²¢ÔÚ.NET Framework 4.0 BetaÖнøÒ»²½³ÉÊì¡£×÷ΪASP.NET ¿ª·¢ÈËÔ±£¬ÎÒÃDz»Ãâ»á¶ÔÕâÁ½¸ö¹¦ÄÜÏà½üµÄ×é¼þ±§ÓÐÐí¶àÒÉÎÊ£¬ÖîÈç“ËüÃÇÓÐʲôÒìͬ£¿”“·Ö±ðÊÊÓÃÓÚʲô»·¾³£¿”µÈµÈ¡£±¾ÎÄÖ¼ÔÚÃèÊöÕâÁ½Õß ......
ʹÓà Web ²¿¼þ¿Ø¼þ£¬¿ÉÒÔÈÃÓû§ÔÚÔËÐÐʱ´´½¨Á½¸ö·þÎñÆ÷¿Ø¼þÖ®¼äµÄÁ¬½Ó£¬ÒÔÐγÉÁ¬½Ó²¢¹²ÏíÊý¾Ý¡£Ò»¸ö¿Ø¼þÓÃ×÷Êý¾ÝµÄÌṩÕߣ¬ÁíÒ»¸ö¿Ø¼þÓÃ×÷Êý¾ÝµÄʹÓÃÕß¡£ÕâÁ½¸ö¿Ø¼þ¿ÉÒÔÊÇ WebPart ¿Ø¼þ»òÈκÎÆäËûÀàÐ͵ķþÎñÆ÷¿Ø¼þ¡£±ØÐ뽫ËüÃÇÉè¼ÆΪ´¦ÀíÁ¬½ÓÇÒλÓÚ WebPartZoneBase ÇøÓòÖС£
ÔÚ ......
¾Å¡¢ASP.NETÖÐGDI+
protected void Page_Load(object sender, EventArgs e)
{
string Filename;
System.Drawing.Image g;
&nbs ......
ÏÈ¿´¿´ASP.NETÒ³ÃæˢеÄʵÏÖ·½·¨£º
µÚÒ»£º
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } µÚ¶þ£º
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.locatio ......