Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..
Im using ajax extender time picker. Im using 4 tabs in a tab container and i need to use timpicker for only one tab. But at runtime it displays for all tabs at the same position. How to keep timepicker visible false for remaining tabs or how to use for only one tab.....guide soon
Posted

1 solution

Hi ,
Make Enabled = false ;
C#
protected void Button1_Click(object sender, EventArgs e)
{
    TextBox1_CalendarExtender.Enabled = true;
}


XML
<div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
        Enabled="false" TargetControlID="TextBox1">
    </asp:CalendarExtender>
    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

</div>

Best Regards
M.Mitwalli
 
Share this answer
 
Comments
Mohamed Mitwalli 12-Sep-12 3:42am    
you can create your own extender on run time like
AjaxControlToolkit.CalendarExtender ca = new AjaxControlToolkit.CalendarExtender();
ca.TargetControlID = "yourTextbox";
This will solve your problem i think
you will created according your needs .
Priyaaammu 12-Sep-12 4:35am    
K....but how to make the timepicker control visible false at run time. For example i want to show timepicker only to textbox of tabpanel1,and didnt use for other tabpanel2,tabpanel3 and tabpanel4. At runtime,timepicker shown for all the 4 tabpanels....how to solve it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900