更新时间:2023-10-25 16:52:16
(function(){
(function () {
( #<%= txtAuditduedate.ClientID%>')。datepicker(
{minDate: 0 ,changeMonth: true ,changeYear: true } );
});
< / script >
< asp:UpdatePanel runat = server ID = upnlAddschedule UpdateMode = 条件 >
< ContentTemplate>
< table cellpadding = 5 cellspacing = 5 width = 100% >
< tr>
< td align = right >
< asp:标签runat = server ID = lblAuditlist Text = 审核名称:/>
< / td>
< td align = left >
< asp:DropDownList runat =服务器 ID = ddauditlist TabIndex = 100 AppendDataBoundItems = true Width = 194px AutoPostBack = true OnSelectedIndexChanged = DropDownList1_SelectedIndexChanged >
< / asp:DropDownList>
< / td>
< / tr>
< tr>
< td align = right >
< asp:标签runat =服务器 ID = lblDuedate Text =审核到期日: >< / asp:Label>
< / td>
< td align = left >
< asp:TextBox runat = server ID = txtAuditduedate Width = 189px Font-Bold = False ReadOnly = true TabIndex = 101 />
< / td>
< / tr>
< / table>
< / ContentTemplate>
< / asp:UpdatePanel>
('#<%= txtAuditduedate.ClientID %>').datepicker( { minDate: 0, changeMonth: true, changeYear: true }); }); </script> <asp:UpdatePanel runat="server" ID="upnlAddschedule" UpdateMode="Conditional"> <ContentTemplate> <table cellpadding="5" cellspacing="5" width="100%"> <tr> <td align="right"> <asp:Label runat="server" ID="lblAuditlist" Text="Audit Name:/> </td> <td align="left"> <asp:DropDownList runat="server" ID="ddauditlist" TabIndex="100" AppendDataBoundItems="true" Width="194px" AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList> </td> </tr> <tr> <td align="right"> <asp:Label runat="server" ID="lblDuedate" Text="Audit Due Date:"></asp:Label> </td> <td align="left"> <asp:TextBox runat="server" ID="txtAuditduedate" Width="189px" Font-Bold="False" ReadOnly="true" TabIndex="101" /> </td> </tr> </table> </ContentTemplate> </asp:UpdatePanel>
这是我的下拉绑定代码
This is my dropdown bind code
public void FillDropDownList()
{
s = WebConfigurationManager.ConnectionStrings["Scon"].ConnectionString;
con = new SqlConnection(s);
con.Open();
cmd = new SqlCommand("select AUDITNAME from MASTER ", con);
dr = cmd.ExecuteReader();
while (dr.Read())
{
ddauditlist.Items.Add(new ListItem(dr["AUDITNAME"].ToString()));
}
dr.Close();
con.Close();
}
尝试:
<script type="text/javascript">
function pageLoad() {