asp.net中的Ajax日历 [英] Ajax calendar in asp.net
本文介绍了asp.net中的Ajax日历的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
Hi All,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="atk" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<atk:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<table>
<tr>
<td>First Name:</td>
<td><asp:TextBox ID="TextBox3" runat="server"></td>
</tr>
<tr>
<td>Last Name:</td>
<td><asp:TextBox ID="TextBox2" runat="server"></td>
</tr>
<tr>
<td>Age:</td>
<td><asp:TextBox ID="TextBox1" runat="server"></td>
</tr>
<tr>
<td>DOB:</td>
<td>
<asp:TextBox ID="txtDOB" runat="server">
<atk:CalendarExtender ID="CalendarExtender1"
runat="server" PopupButtonID="imgCalendat" TargetControlID="txtDOB">
</td>
<td><asp:ImageButton ID="imgCalendar" runat="server" ImageUrl="~/Images/agt_action_success.png" /> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
这是我的代码.单击时不查看图像按钮日历.为什么?请更正此问题.
This is my Code. when click a Image Button calendar is not viewed. why? Please correct this.
推荐答案
PopupButtonID="imgCalenda<big>t</big>"
使其为PopupButtonID="imgCalendar"
并进行检查.
PopupButtonID="imgCalenda<big>t</big>"
Make itPopupButtonID="imgCalendar"
and check.
我注意到PopupButtonID和ImageButton id不一致.
I have notice that the PopupButtonID and the ImageButton id as not the same.
PopupButtonID="imgCalendat"
更改为
Change it to
PopupButtonID="imgCalendar"
这篇关于asp.net中的Ajax日历的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文