压光机控制asp.net [英] Calender control asp.net

查看:74
本文介绍了压光机控制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...........

推荐答案

请注意,该文本框不在更新面板内,因此在刷新时不会刷新更新面板被触发.

您需要将文本框放在更新面板中.
Please see, the textbox is NOT inside the update panel and thus it does not gets refreshed when the update panel is triggered.

You need to put the textbox inside the update panel.


Sandeep,

如果我在更新面板中添加文本框,则无法使用.

我的aspx代码在下面给出
hi Sandeep,

if i add the textbox within update panel its not work.

my aspx code is given below
<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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆