本文介绍了压光机控制asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在Visual Studio的应用程序中使用压延机控制.

我的.aspx页在下面给出.

hi to all ,

i am using calender control in my application from visual studio.

my .aspx page is given below.

<td><asp:TextBox ID="FromCalTextBox" runat="server" CssClass="BoxText" ></asp:TextBox>
     <asp:UpdatePanel ID="UpdatePanel3" runat="server">
         <ContentTemplate>
     <asp:Calendar ID="Calendar1" runat="server"

     onselectionchanged="Calendar1_SelectionChanged" ShowGridLines="True"

     Visible="False" CellPadding="1" DayNameFormat="Shortest" Height="71px"

     Width="71px"></asp:Calendar>
     </ContentTemplate>
      <Triggers>
   <asp:AsyncPostBackTrigger ControlID="btnShowCalendar" EventName="click" />
   </Triggers>
     </asp:UpdatePanel>
     <asp:Button ID="btnShowCalendar" runat="server" CssClass="Btn"

     Text="From Date" onclick="btnShowCalendar_Click" /></td>
     <td>


我的.aspx.cs文件在下面给出


my .aspx.cs file is given below

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
   {
       FromCalTextBox.Text = Calendar1.SelectedDate.ToString("dd/MM/yyyy");
       Calendar1.Visible = false;
   }


protected void btnShowCalendar_Click(object sender, EventArgs e)
   {
       Calendar1.Visible = true;
   }



当我单击日历显示时,但是当我选择日期时,它不显示在文本框中..

请帮助我...........



when i click on button calender show but when i select the date its not display with textbox..

please help me...........

推荐答案


<asp:UpdatePanel ID="UpdatePanel3" runat="server">
     <ContentTemplate>
     <td><asp:TextBox ID="FromCalTextBox" runat="server" CssClass="BoxText" ></asp:TextBox>
     <asp:Calendar ID="Calendar1" runat="server"

     onselectionchanged="Calendar1_SelectionChanged" ShowGridLines="True"

     Visible="False" CellPadding="1" DayNameFormat="Shortest" Height="71px"

     Width="71px"></asp:Calendar>
     </ContentTemplate>
     <Triggers>
      <asp:AsyncPostBackTrigger ControlID="btnShowCalendar" EventName="click" />
     </Triggers>
      </asp:UpdatePanel>
     <asp:Button ID="btnShowCalendar" runat="server" CssClass="Btn"

     Text="From Date" onclick="btnShowCalendar_Click" /></td>


当我运行页面时,它不会弹出按钮上的压光机.

请帮助我.


when i run page its not popup the calender on button click.

please help me.


这篇关于压光机控制asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 21:13