	<script language="c#" runat="server">
	public string NowTime{//设定及返回日期
		get{
			return STime.Text;
		}
		set{
			if(value != ""){
				STime.Text = value;
			}
			else{
				STime.Text = "09:00";
			}
		}
	}
	void UpHalf(object sender,EventArgs e){
		DateTime h;
		h=Convert.ToDateTime(STime.Text).AddMinutes(30);//加30分
		STime.Text=h.ToString("HH:mm");
	}
	void DownHalf(Object sender, EventArgs e){
		DateTime h;
		h=Convert.ToDateTime(STime.Text).AddMinutes(-30);//减30分
		STime.Text=h.ToString("HH:mm");
	}
	void btn_click(Object sender, EventArgs e){
		Up.Visible=true;
		btn.Visible=false;
		Down.Visible=true;
		OK.Visible=true;
		STime.Enabled=true;
	}
	void OKClick(Object sender, EventArgs e){
		Up.Visible=false;
		btn.Visible=true;
		Down.Visible=false;
		OK.Visible=false;
		STime.Enabled=false;
	}
</script>

<asp:textbox  Columns="7" cssclass="Tab_TBX_1" ID="STime" enabled="false" Runat="server" />
 <asp:LinkButton Text="Time" cssclass="Tab_Btn_2" id="btn" Runat="server" onclick="btn_click" />
  <asp:CustomValidator id="CustomValidator1" runat="server"
      ControlToValidate="STime"
      ClientValidationFunction="CheckTime">
</asp:CustomValidator>
<asp:Linkbutton id="Up" Text="Up" Onclick="UpHalf" Runat="server" Visible="false" />
<asp:Linkbutton id="Down" Text="Down" Onclick="DownHalf" Runat="server" Visible="false" />
<asp:Linkbutton id="OK" Text="OK" Onclick="OKClick" Runat="server" Visible="false" />
<script language=vbscript>
Function CheckTime(source, arguments)
If IsDate(date() & " " & arguments.value & ":00") = false Then
	Msgbox "时间输入错误"
end if
End Function
</script>