Hi,
Can you tell me why I can never get the Rad ajax manager to work properly? Everytime I've attempted to use this feature it only partially works. Everything seems to work fine except there is still a postbackto causing my browser to refresh. Is there somthing i'm down wrong?I was under the impression that using this feature will allow me to update a control without the postback, am I wrong? Here's the aspx , followed by the c#
Can you tell me why I can never get the Rad ajax manager to work properly? Everytime I've attempted to use this feature it only partially works. Everything seems to work fine except there is still a postbackto causing my browser to refresh. Is there somthing i'm down wrong?I was under the impression that using this feature will allow me to update a control without the postback, am I wrong? Here's the aspx , followed by the c#
<div id="StatusWrapper"> <telerik:RadAjaxManager ID="RadAjaxManager" runat="server"> <ClientEvents OnResponseEnd="OnResponseEnd" OnRequestStart="OnRequestStart"></ClientEvents> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="btnMakeActive"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="lblStatus" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="BtnSend"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="lblStatus" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <div id="Status"> Status: <asp:Label ID="lblStatus" runat="server" Text="Active"></asp:Label> </div> </div>
protected void btnMakeActive_Click1(object sender, EventArgs e)
{
string currentStatus = Staff.GetStaffStatus(id);
string status = string.Empty;
if (currentStatus == "Active")
status = "Inactive";
if (currentStatus == "Inactive")
status = "Active";
Staff.UpdateStatus(id, status);
lblStatus.Text = status;
}