av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

編寫C#日期時間控件的幾種方法

參照用JavaScript編寫的日期選擇,將其中的JavaScript部分寫入控件中就可以了。C#日期時間控件代碼不復雜,拿出來大家共享以下。大家?guī)兔φ艺褺ug,提提改進意見。

成都創(chuàng)新互聯(lián)公司專注于企業(yè)全網(wǎng)整合營銷推廣、網(wǎng)站重做改版、普洱網(wǎng)站定制設(shè)計、自適應品牌網(wǎng)站建設(shè)、html5、商城網(wǎng)站制作、集團公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站制作、高端網(wǎng)站制作、響應式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為普洱等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

實現(xiàn)效果如下:

 Bug:控件放到frame 的頁面里面使用得時候就會出錯:“parent.event 為空或不是對象”
將InputCalendar.cs中output.WriteLine("parent.event.cancelBubble=true;");一句去掉即可。
這一句的意義是:設(shè)置或獲取當前事件是否要在事件句柄中向上冒泡。當前應用中好像沒有用,所以去掉也不要緊。

如何增加Autopostpack功能:

 
 
 
 
  1. if (autopostback==true )   
  2. {   
  3. output.WriteLine ("javascript:"+Page.GetPostBackEventReference(this)+";");   
  4. }   
  5. //添加了一個AUTOPOSTBACK功能。  

在頭部加上如下代碼,即可實現(xiàn)選擇Autopostpack功能了。

 
 
 
 
  1. private bool autopostback=true;   
  2. [Bindable(true),   
  3. Category("Appearance"),   
  4. DefaultValue(true)]   
  5. public bool AutoPostBack   
  6. {   
  7. get   
  8. {   
  9. return autopostback;   
  10. }   
  11. set   
  12. {   
  13. autopostback=value;   
  14. }   

解決在用戶C#日期時間控件控件中取值問題:

將原來的C#日期時間控件:

 
 
 
 
  1. output.AddAttribute(HtmlTextWriterAttribute.Id,this.ID);   
  2. output.AddAttribute(HtmlTextWriterAttribute.Name,this.ID);  

改為:

 
 
 
 
  1. output.AddAttribute(HtmlTextWriterAttribute.Id,this.UniqueID);   
  2. output.AddAttribute(HtmlTextWriterAttribute.Name,this.UniqueID);  

將原來的C#日期時間控件:

 
 
 
 
  1. output.AddAttribute(HtmlTextWriterAttribute.Id,this.ID); output.AddAttribute(HtmlTextWriterAttribute.Name,this.ID); 改為: output.AddAttribute(HtmlTextWriterAttribute.Id,this.UniqueID); output.AddAttribute(HtmlTextWriterAttribute.Name,this.UniqueID); 

分享標題:編寫C#日期時間控件的幾種方法
新聞來源:http://uogjgqi.cn/article/cccpcdj.html
掃二維碼與項目經(jīng)理溝通

我們在微信上24小時期待你的聲音

解答本文疑問/技術(shù)咨詢/運營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流