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

ASP.NET

Ê®¡¢ÈçºÎ£º¶ÁÈ¡ Calendar Web ·þÎñÆ÷¿Ø¼þÖеÄÑ¡¶¨ÈÕÆÚ
      µÚÒ»¸öʾÀýÏÔʾµ±Ç°Ñ¡¶¨µÄÈÕ¡£µÚ¶þ¸öʾÀýÏÔʾËùÓÐÑ¡¶¨µÄÈÕÆÚ£¬¿ÉÒÔÊǵ¥¸öÈÕ¡¢ÖÜ»òÔ¡£
// Example 1
Label1.Text = Calendar1.SelectedDate.ToShortDateString();
 
// Example 2
String s = "";
foreach(DateTime d in Calendar1.SelectedDates)
{
    s += "<br />" + d.ToShortDateString();
}
Label1.Text = s;
 
´ËʾÀýÐèÒª£º
·Web ´°ÌåÒ³¡£
·ÃûΪCalendar1 µÄ Calendar ¿Ø¼þ¡£
·ÃûΪLabel1 µÄ Label ¿Ø¼þ¡£
 
¿É¿¿±à³Ì£º
Èç¹ûֻѡÔñÒ»ÈÕ£¬Ôò SelectedDates ÊôÐÔ½«Ö»»ñÈ¡Ò»¸öÈÕÆÚ¡£Èç¹ûÑ¡ÔñÒ»ÖÜ»òÒ»Ô£¬Ôò SelectedDate ÊôÐÔ½«»ñÈ¡¸Ã¼¯ºÏµÄµÚÒ»¸öÈÕÆÚ¡£
 
ʮһ¡¢ÈçºÎ£ºÔÚ Calendar Web ·þÎñÆ÷¿Ø¼þÖÐÒÔ±à³Ì·½Ê½Ñ¡ÔñÈÕÆÚ
      ¿ÉÓÃÄú×Ô¼ºµÄ´úÂëÉèÖÃÈÕÆÚÑ¡¶¨£¬°üÀ¨µ¥¸öÈÕÆÚ»òÒ»¸öÈÕÆÚ·¶Î§¡£ÓëÒ³ÉϿؼþÖеÄÓû§Ñ¡¶¨²»Í¬£¬Äú¿ÉÔÚ´úÂëÖÐÑ¡¶¨¶à¸ö·ÇÁ¬ÐøÈÕÆÚ¡£
˵Ã÷£º ÒÔ±à³Ì·½Ê½ÉèÖÃÈÕÆÚ²»»áÒý·¢ SelectionChanged ʼþ¡£
 
      A¡¢Ñ¡¶¨µ¥¸öÈÕÆÚ
½«¿Ø¼þµÄ SelectedDate ÊôÐÔÉèÖÃΪ DateTime ÀàÐ͵ıí´ïʽ¡£
Calendar1.SelectedDate = DateTime.Today;
      ˵Ã÷£º Èç¹ûÉèÖà SelectedDate£¬Ôò SelectedDates ÖеÄËùÓÐÈÕÆÚ¶¼»á±»ÓÐЧµØÇå³ý¡£
 
      B¡¢Ñ¡ÔñÈÕÆÚ·¶Î§
µ÷ÓÿؼþµÄ SelectedDates ¼¯ºÏµÄ Add ·½·¨¡£¿É°´ÈÎÒâ˳ÐòÌí¼ÓÈÕÆÚ£¬ÒòΪ¼¯ºÏ½«×Ô¶¯¶ÔÈÕÆÚ½øÐÐÅÅÐò¡£¼¯ºÏ»¹Ç¿ÖÆʵÏÖΨһÐÔ£¬Òò´ËÈç¹ûÌí¼ÓµÄÈÕÆÚÒѾ­´æÔÚÓÚ¼¯ºÏÖУ¬Ôò¼¯ºÏ½«ºöÂÔ¸ÃÈÕÆÚ¡£
ÏÂÃæµÄʾÀý½«ÈÕÆÚÑ¡¶¨ÉèÖÃΪ 2000 Äê 2 ÔÂÖеÄÿ¸öÐÇÆÚÈý¡£
public void Button1_Click (object sender, System.EventArgs e)
{
   SelectedDatesCollection theDates = Calendar1.SelectedDates;
   theDates.Clear();
   theDates.Add(new DateTime(2000,2,2));
   theDates.Add(new DateTime(2000,2,9));
   theDates.Add(new DateTime(2000,2,16));
   theDates.Add(new DateTime(2000,2,23));
}  
      ÏÂÃæµÄʾÀýÑ¡ÔñÒ»¸ö°üº¬Æ߸öÈÕÆÚµÄÐòÁС£
DateTime aDate = Date


Ïà¹ØÎĵµ£º

ASP.NETʵÏÖÓû§µÚ¶þ´Î·ÃÎÊÍøÕ¾²»ÓÃÌá½»ÐÅÏ¢

 ÔÚÎÒÃÇ·ÃÎÊһЩÍøÕ¾µÄʱºò»áÓÐÒ»¸ö¸´Ñ¡¿òÉÏÃæд×Å“Á½¸öÐÇÆÚÄÚ£¬²»ÔÙÒªÇóÊäÈëÃÜÂ딵ÄÀàËÆÄÚÈÝ£¬Èç¹û¹´Ñ¡ÉÏ£¬µÈÓû§Ï´εǼµÄʱºò¾Í¿ÉÒÔ²»ÓÃÔÙÊäÈëÃÜÂëÁË£¬Ö±µ½Á½¸öÐÇÆÚÒÔºó¡£½ñÌìС±à¾ÍºÍ´ó¼ÒÀ´ÊµÏÖÕâ¸ö¼¼Êõµã£ºµ±Óû§µÇ¼ʱ£¬Èç¹ûÑ¡ÖГÁ½¸öÐÇÆÚÄÚ£¬²»ÔÙÒªÇóÊäÈëÃÜÂ딸´Ñ¡¿ò£¬ÔòÔÚÁ½¸öÐÇÆÚÄÚ ......

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.location.href=document.URL; < /sc ......

Asp.net ³¤ÎÄÕ·ÖÒ³

public string NoHTML(string Htmlstring) //È¥³ýHTML±ê¼Ç
{
//ɾ³ý½Å±¾
Htmlstring = Regex.Replace(Htmlstring, @" <script[^>]*?>.*? </script>", "", RegexOptions.IgnoreCase);
//ɾ³ýHTML
Htmlstring = Regex.Replace(Htmlstring, @" <(.[^>]*)>", "", RegexOptions.IgnoreCase); ......

ASP.NETÒ³ÃæÉúÃüÖÜÆÚºÍasp.netÓ¦ÓóÌÐòÉúÃüÖÜÆÚ

Ò³ÃæÉúÃüÖÜÆÚ
Ò³ ÃæÉúÃüÖÜÆÚÖ´ÐÐһϵÁв½Ö裺ҳÃæµÄ³õʼ»¯¡¢ÊµÀý»¯¿Ø¼þ¡¢»¹Ô­ºÍά»¤×´Ì¬¡¢ÔËÐÐʼþ´¦Àí³ÌÐò´úÂë¡¢³ÊÏÖ¡£ÎªÁËÔÚºÏÊʵĽ׶ÎÖ´ÐÐËùÐèµÄ´úÂ룬ËùÒÔÒª¶ÔÒ³ÃæÉúÃü ÖÜÆڷdz£ÊìϤ¡£ÔÚÒ³ÉúÃüÖÜÆڵĸ÷¸ö½×¶Î£¬Ò³Ãæ»áÖð¸öÒý·¢¶¨ÒåµÄʼþ£¬Í¨¹ý¶Ô´úÂ뿪·¢£¬ÔÚÒ³ÃæµÄÉúÃüʼþÖÐÖ´ÐÐÎÒÃÇËùÐèÒªµÄ³ÌÐò
Ò³ÉúÃüÖÜÆڽ׶Î
1¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ