This is a migrated thread and some comments may be shown as answers.

Why is this happening?

4 Answers 71 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 28 Oct 2008, 07:04 PM
I have this code which includes the runat="server" so I don't have to wrap a RadCode Block.
<table cellpadding="3" cellspacing="1" style="width: 100%"
    <tr> 
        <td align="right" runat="server"
            <asp:Button id="ContinueButton" OnClick="ContinueShopping" runat="server" Text='<%#RM.GetString("BASKET_CONTINUE_SHOPPING")%>' /> 
            <asp:Button id="CheckoutButton" OnClick="Checkout" runat="server" Text='<%#RM.GetString("BASKET_PROCEED_CHECKOUT")%>' /> 
        </td> 
    </tr> 
</table>     

One of the buttons gets a ToolTip attached programmatically.  When it renders in the browser it renders as:
<td align="right"
<input id="ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_ContinueButton" type="submit" value="Continue Shopping" name="ctl00$MainContent$ShoppingCart1$ThemeShoppingCart1$ContinueButton"/> 
<div id="ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_CheckoutButtonPanel" style="display: block;"
<input id="ctl00_MainContent_ShoppingCart1_ThemeShoppingCart1_CheckoutButton" type="submit" value="Proceed to Checkout" name="ctl00$MainContent$ShoppingCart1$ThemeShoppingCart1$CheckoutButton"/> 
</div> 
</td> 
The "style=display:block" is causing it to render below my other button and it should render side by side.


4 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 29 Oct 2008, 04:38 PM
Hi Kevin,

If you are using RadAjaxManager/RadAjaxPanel to ajaxify your page, try handling the AjaxSettingsCreating event and set the update panels RenderMode to Inline:

protected void RadAjaxManager2_AjaxSettingCreating(object sender, AjaxSettingCreatingEventArgs e)  
{  
    e.UpdatePanel.RenderMode = UpdatePanelRenderMode.Inline;  

Let me know if this helps.

Regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Kevin
Top achievements
Rank 2
answered on 29 Oct 2008, 05:42 PM
Amazing.  That worked.  I need better training!!!
0
Kevin
Top achievements
Rank 2
answered on 29 Oct 2008, 07:43 PM
But the RadAjaxManagerProxy doesn't have this event.  Since this is in a control going into a master page I have to put the manager in the control or have every instance everywhere set to inline rendering.

I'm a beginner at this stuff.  But, this begs the question about the RadAjaxManagerProxy and how useful it really is if it doesn't look just like a RadAjaxManager when used in the master page and user control scenarios.  I continue to look for good documentation on how to do this but there's always some limitation like what I've encountered.
0
Vlad
Telerik team
answered on 30 Oct 2008, 07:11 AM
Hi Kevin,

RadAjaxManagerProxy is just a storage for settings. If you want to attach events you can use RadAjaxManager.GetCurrent(Page) method to find the manager and attach desired event.

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Kevin
Top achievements
Rank 2
Answers by
Iana Tsolova
Telerik team
Kevin
Top achievements
Rank 2
Vlad
Telerik team
Share this question
or