CalendarExtender causes reflow of page elements?

Last post 03-20-2008 2:27 PM by tmpuzer. 2 replies.

Sort Posts:

  • CalendarExtender causes reflow of page elements?

    03-19-2008, 7:49 PM
    • Loading...
    • tmpuzer
    • Joined on 03-07-2008, 12:45 PM
    • Posts 315

    The CalendarExtender control is causing elements to be repositioned after it pops up.  After pop up, the elements stay in the new position.

    I have two span's side by side.  I have text box and to the right of the text box, I have a button.  The reason I have the span's is because I use them to dynamically show/hide the text box.  When the calendar pops up, the button is moved under the text box.  I don't want this to happen, I want them to stay side by side. 

    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
        
    <span>
       Date: <asp:TextBox ID="DateTextBox" runat="server" />
    
       <ajax:CalendarExtender ID="CalendarExtender2" runat="server"
                TargetControlID="DateTextBox">
       </ajax:CalendarExtender>
    </span>        
    
    
    <span>
      <asp:Button ID="SearchButton" runat="server" Text="Search" />
    </span>        
    

     I notice if I remove the first span tag, then it actually works as desired, but then I can't dynamically show/hide that section.

    1. Any ideas on why is this happening?

    2. How can I get this to work?
     

    If a post helps me I'll always eventually mark it as an answer. But I frequently don't mark it right away because I feel once a thread is marked as answered, discussion tends to end. And I like to discuss things a bit.
  • Re: CalendarExtender causes reflow of page elements?

    03-19-2008, 10:26 PM
    Answer
    • Loading...
    • anas
    • Joined on 09-21-2006, 8:31 AM
    • Jerusalem
    • Posts 4,069

    Hi

    Im not sure why ,

    but you can use html table ,

     

    <table>
    <tr>
    <td style=" width:100px; ">
    Date:
    </td>
    <td style=" width:300px ;">
    <asp:TextBox ID="DateTextBox" runat="server" />
    <ajax:CalendarExtender ID="CalendarExtender2" runat="server"
    TargetControlID="DateTextBox">
    </ajax:CalendarExtender>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Button ID="SearchButton" runat="server" Text="Search" />
    </td>
    <td></td>
    </tr>
    </table>

     
    Best Regards,

    Anas Ghanem| LogFile
  • Re: CalendarExtender causes reflow of page elements?

    03-20-2008, 2:27 PM
    • Loading...
    • tmpuzer
    • Joined on 03-07-2008, 12:45 PM
    • Posts 315

     I don't like the idea of using a table, but your idea works which is the most important thing, and it hadn't crossed my mind to use a table.

    If a post helps me I'll always eventually mark it as an answer. But I frequently don't mark it right away because I feel once a thread is marked as answered, discussion tends to end. And I like to discuss things a bit.
Page 1 of 1 (3 items)
Microsoft Communities
Page view counter