	<script language="VB" runat="server">
	public Property NowTime() as string'设定及返回日期
		get
			return STime.Text
		end get
		set
			if value <> "" then
				STime.Text = value
			else
				STime.Text = "09:00"
			end if
		end set
	end property
	sub UpHalf(sender as object,e as EventArgs)
		dim h as DateTime
		h=Convert.ToDateTime(STime.Text).AddMinutes(30)'加30分
		STime.Text=h.ToString("HH:mm")
	end sub
	sub DownHalf(sender as object, e as EventArgs)
		dim h as DateTime
		h=Convert.ToDateTime(STime.Text).AddMinutes(-30)'减30分
		STime.Text=h.ToString("HH:mm")
	end sub
	sub btn_click(sender as object, e as EventArgs)
		Up.Visible=true
		btn.Visible=false
		Down.Visible=true
		OK.Visible=true
		STime.Enabled=true
	end sub
	sub OKClick(sender as object, e as EventArgs)
		Up.Visible=false
		btn.Visible=true
		Down.Visible=false
		OK.Visible=false
		STime.Enabled=false
	end sub
</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>