国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

asp.net下的日歷控件源代碼

2024-07-10 12:56:50
字體:
來源:轉載
供稿:網友
前臺aspx文件
<%@ register tagprefix="componentart" namespace="componentart.web.ui" assembly="componentart.web.ui" %>
<%@ page language="c#" codebehind="democalendar.aspx.cs" autoeventwireup="false" inherits="ordermrp.demo.calendar.democalendar" %>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en" >
<html>
<head>
<title>日歷控件</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<script>
var dropshow=false
var currentid
function dropdown(el){
if(dropshow){
dropfadeout()
}else{
currentid=el
el.style.visibility="visible"
dropfadein()
}
}
function dropfadein(){
if(currentid.filters.alpha.opacity<100){
currentid.filters.alpha.opacity+=20
fadetimer=settimeout("dropfadein()",50)
}else{
dropshow=true
cleartimeout(fadetimer)
}
document.all.ddl_text.innertext="";
}
function dropfadeout(){
if(currentid.filters.alpha.opacity>0){
cleartimeout(fadetimer)
currentid.filters.alpha.opacity-=20
fadetimer=settimeout("dropfadeout()",50)
}else{
dropshow=false
currentid.style.visibility="hidden"
}
}
function dropdownhide(){
if(dropshow){
dropfadeout()
dropshow=false
}
}

/*
function hilight(el)
{
if(dropshow)
{
for(i=0;i<el.parentelement.childnodes.length;i++)
{
el.parentelement.childnodes(i).classname="link_record0"
}
el.classname="link_record1"
}
}
//function checkme(el){
//document.all.ddl_text.innertext=el.innertext
//}
*/
document.onclick=dropdownhide
</script>
<link href="ddlcontrol.css" type="text/css" rel="stylesheet">
</head>
<body bgcolor="#e6e7ed" onload="document.all.form1.reset()">
<form id="form1" runat="server">
<table id="table20">
<tr>
<td>
<div class="link_box" onselectstart="return false" style="width: 100px">
<div class="link_head">
<table id="table30" height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td>
<div class="link_text"><nobr><asp:textbox id="ddl_text" runat="server" width="97px" font-size="9pt" borderstyle="groove">---請選擇---</asp:textbox><!--onkeyup="dropdown(value11)" onchange="window.alert('vv')"-->
<!--
<label id="ddl_text">---請選擇---</label>
<input id="ddl_text" type="text" value="---請選擇---" name="ddl_text">
--></nobr></div>
</td>
<td align="right" width="22"><img alt="" src=http://www.163design.net/n/a/"..images/other/bimg.gif" onload="this.style.cursor='hand'" onclick="dropdown(value11)"
onmouseup="this.classname='link_arrow0'" class="link_arrow0" onmousedown="this.classname='link_arrow1'" onmouseout="this.classname='link_arrow0'"
onmouseover="" height="20" width="16">
<!--
<div onmouseup="this.classname='link_arrow0'" class="link_arrow0" onmousedown="this.classname='link_arrow1'"
onmouseout="this.classname='link_arrow0'">6</div>
-->
</td>
</tr>
</table>
</div>
<div class="link_value" id="value11" style="width: 200px; height: 200px">
<table id="table40" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
<tr>
<td align="center" bgcolor="#ffffff" height="30"><asp:calendar id="calendar1" runat="server" font-size="5pt" width="198px" backcolor="white" cellpadding="1"
forecolor="royalblue" borderwidth="1px" daynameformat="firstletter" height="198px" font-names="verdana" bordercolor="#d9d9e6" nextmonthtext="下月"
prevmonthtext="上月">
<todaydaystyle forecolor="white" backcolor="#99cccc"></todaydaystyle>
<selectorstyle forecolor="#336666" backcolor="#99cccc"></selectorstyle>
<nextprevstyle font-size="8pt" forecolor="snow"></nextprevstyle>
<dayheaderstyle height="1px" forecolor="#336666" backcolor="#99cccc"></dayheaderstyle>
<selecteddaystyle font-bold="true" forecolor="#ccff99" backcolor="#009999"></selecteddaystyle>
<titlestyle font-size="7pt" font-bold="true" height="25px" borderwidth="1px" forecolor="white"
borderstyle="solid" bordercolor="#d9d9e6" backcolor="#6699cc"></titlestyle>
<weekenddaystyle backcolor="#ccccff"></weekenddaystyle>
<othermonthdaystyle forecolor="#999999"></othermonthdaystyle>
</asp:calendar></td>
</tr>
</table>
</div>
</div>
</td>
<td><asp:imagebutton id="imagebutton1" runat="server" imageurl="~/images/loginimg/login_ok.gif"></asp:imagebutton></td>
</tr>
</table>
<p>&nbsp;</p>
<p><font face="宋體"></font>&nbsp;</p>
<p><font face="宋體"></font>&nbsp;</p>
<p><font face="宋體"></font>&nbsp;</p>
<p><font face="宋體"></font>&nbsp;</p>
<p><font face="宋體"></font>&nbsp;</p>
<p>&nbsp;</p>
</form>
</body>
</html>

后臺cs文件
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 system.web.ui.webcontrols;
using system.web.ui.htmlcontrols;

using nicklee.web.ui;

namespace ordermrp.demo.calendar
{
/// <summary>
/// democalendar 的摘要說明。
/// </summary>
public class democalendar : system.web.ui.page
{
private nicklee.web.ui.encryption en1=new encryption();
private webdatafill fill=new webdatafill();

protected system.web.ui.webcontrols.imagebutton imagebutton1;
protected system.web.ui.webcontrols.textbox ddl_text;
protected system.web.ui.webcontrols.button button1;
protected system.web.ui.webcontrols.calendar calendar1;

private void page_load(object sender, system.eventargs e)
{
fill.constring=system.configuration.configurationsettings.appsettings["sqlconnectionstring"];

}

#region web form designer generated code
override protected void oninit(eventargs e)
{
//
// codegen:該調用是 asp.net web 窗體設計器所必需的。
//
initializecomponent();
base.oninit(e);
}

/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void initializecomponent()
{
this.ddl_text.textchanged += new system.eventhandler(this.ddl_text_textchanged);
this.calendar1.visiblemonthchanged += new system.web.ui.webcontrols.monthchangedeventhandler(this.calendar1_visiblemonthchanged);
this.calendar1.selectionchanged += new system.eventhandler(this.calendar1_selectionchanged);
this.imagebutton1.click += new system.web.ui.imageclickeventhandler(this.imagebutton1_click);
this.load += new system.eventhandler(this.page_load);

}
#endregion

private void imagebutton1_click(object sender, system.web.ui.imageclickeventargs e)
{
if(ddl_text.text!="")
{
webjsutil.alert(this,ddl_text.text);
this.ddl_text.text="---請選擇---";
// webjsutil.executeclientscriptonwindowload(this,"dropdown(value11)");
}
else
{
webjsutil.alert(this,"請選擇或輸入!");
}
}

private void calendar1_selectionchanged(object sender, system.eventargs e)
{
ddl_text.text=calendar1.selecteddate.toshortdatestring();
}

private void calendar1_visiblemonthchanged(object sender, system.web.ui.webcontrols.monthchangedeventargs e)
{
webjsutil.executeclientscriptonwindowload(this,"dropdown(value11)");
}

private void ddl_text_textchanged(object sender, system.eventargs e)
{
// webjsutil.alert(this,this.ddl_text.text);
}
}
}




  • 網站運營seo文章大全
  • 提供全面的站長運營經驗及seo技術!
  • 發表評論 共有條評論
    用戶名: 密碼:
    驗證碼: 匿名發表
    主站蜘蛛池模板: 慈利县| 临漳县| 嘉善县| 田林县| 景谷| 高邮市| 北流市| 廊坊市| 东阿县| 浑源县| 沁阳市| 洪湖市| 永修县| 汽车| 白河县| 乌拉特后旗| 黄龙县| 仪征市| 江达县| 临邑县| 滨海县| 伊通| 桑植县| 呼玛县| 红安县| 共和县| 诸城市| 叙永县| 方正县| 诏安县| 衢州市| 朝阳市| 阿图什市| 苏尼特左旗| 淮阳县| 淮滨县| 措勤县| 保定市| 白山市| 安图县| 赣州市|