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

non-Ajaxified Button not working with new release

1 Answer 45 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Drew Robison
Top achievements
Rank 1
Drew Robison asked on 06 Aug 2008, 03:11 PM

A page uses RadAjax to update a literal and submit/cancel button (both inside asp:panel's) when a dropdown selectiong changes. This works fine.
 


However, the button (that is an updated control) click that updates the message literal is not working any more. This used to work fine in Rad Controls for ASP.NET
 
I find that the only way to make it work is if I define AjaxSetting for the button and make the pnlMessage an AjaxUpdatedControl.
 
Please verify if this is a bug or advise what I need to change.
 
Code (sans code behind) included below for reproducing:





<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="AjaxTest.aspx.cs" Inherits="BPDashboardControlPanel.AjaxTest" %>

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

html xmlns="http://www.w3.org/1999/xhtml" >

<

head runat="server">

<title>RadAjax Test</title>

</

head>

<

body>

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<telerik:RadAjaxManager ID="ctlRadAjaxManager" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="ddlGalleries">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="pnlMessage" />

<telerik:AjaxUpdatedControl ControlID="pnlSubmitCancel" />

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<div style="padding: 10px;">

<fieldset style="padding: 10px;">

<legend style="margin-bottom: 5px;">Message Area:</legend>

<asp:Panel ID="pnlMessage" runat="server">

<asp:Literal ID="litMessage" runat="server"></asp:Literal>

</asp:Panel>

</fieldset>

</div>

<div style="padding: 10px;">

<fieldset style="padding: 10px;">

<legend style="margin-bottom: 5px;">Choose Galleries:</legend>

<asp:DropDownList ID="ddlGalleries" runat="server" AutoPostBack="True" CssClass="TextContent"

OnSelectedIndexChanged="ddlGalleries_SelectedIndexChanged">

<asp:ListItem Selected="True">Select Gallery</asp:ListItem>

<asp:ListItem>Gallery 1</asp:ListItem>

<asp:ListItem>Gallery 2</asp:ListItem>

</asp:DropDownList>

<telerik:RadAjaxLoadingPanel ID="ctlAjaxLoadPanelGallery" runat="Server" IsSticky="true">

<div style="margin-top: 5px;">

<asp:Image ID="Image2" runat="server" AlternateText="Loading" BorderWidth="0px" ImageAlign="Left"

ImageUrl="~/Skins/Default/AJAX/loading1.gif" /><br />

</div>

</telerik:RadAjaxLoadingPanel>

</fieldset>

</div>

<div style="padding: 10px;">

<fieldset style="padding: 10px;">

<legend style="margin-bottom: 5px;">Submit:</legend>

<asp:Panel ID="pnlSubmitCancel" runat="server">

<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit" />&nbsp;<asp:Button ID="btnCancel" runat="server" OnClick="btnCancel_Click" Text="Cancel" />

</asp:Panel>

</fieldset>

</div>

</form>

</

body>

</

html>

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Aug 2008, 07:03 AM
Hi Drew Robison,

Could you please elaborate a little bit more on your scenario and the exact functionality you need to acheive. I reviewed your code but was not able to completely understood the problems you are facing.
Please find attached a sample project, prepared by your scenario, which works corectly. Test it on your side and let us now what the difference in your case is.

Thank you for your cooperation.

Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Drew Robison
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or