New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Base class for RadAjaxManager and RadAjaxPanel holding base properties available for both controls.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(Core))]
[ClientScriptResource("Telerik.Web.UI.RadAjaxControl", "Telerik.Web.UI.Ajax.Ajax.js")]
public abstract class RadAjaxControl : WebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IPostBackEventHandler

Inheritance: objectControlWebControlRadAjaxControl

Derived Classes: RadAjaxManagerRadAjaxPanel

Implements: IAttributeAccessorIComponentIControlBuilderAccessorIControlDesignerAccessorIDataBindingsAccessorIDisposableIExpressionsAccessorIParserAccessorIPostBackEventHandlerIUrlResolutionService...

Inherited Members WebControl.AddAttributesToRender(HtmlTextWriter)WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.LoadViewState(object)WebControl.TrackViewState()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.RenderContents(HtmlTextWriter)WebControl.SaveViewState()WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.HeightWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagKeyWebControl.TagNameWebControl.ToolTipWebControl.WidthControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Properties

Gets a reference to AjaxClientEvents, which holds properties for setting the RadAjaxControl client-side events

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public virtual AjaxClientEvents ClientEvents { get; }

This property is overridden in order to support controls which implement INamingContainer. The default value is changed to "AutoID".

C#
public override ClientIDMode ClientIDMode { get; set; }

Overrides: Control.ClientIDMode

Gets or sets if the ajax is enabled. If disabled all ajaxified controls will cause postback.

C#
public virtual bool EnableAJAX { get; set; }
Property Value:

Determines if the Ajax is enabled.

When set to true enables support for WAI-ARIA

C#
public bool EnableAriaSupport { get; set; }

Gets or sets the value, indicating whether to render script references to the embedded scripts or not.

C#
public virtual bool EnableEmbeddedScripts { get; set; }

If EnableEmbeddedScripts is set to false you will have to register the needed Scripts files by hand.

Enables browser back/forward buttons state (browser history). Please, review the RadAjax "Changes and backwards compatibility" - "Back and Forward buttons" article for more info.

C#
public virtual bool EnableHistory { get; set; }

Gets or sets if the page html head tag will be updated during the ajax request.

C#
public virtual bool EnablePageHeadUpdate { get; set; }
Property Value:

Determines if the page html head tag will be updated during the ajax request.

Gets if the requst is ajax or full postback.

C#
[Browsable(false)]
public virtual bool IsAjaxRequest { get; }
Property Value:

Determines if the request is ajax; otherwise its full postback

String array with filter strings. Ajax trigger control whose ID matches one of these values will perform a synchronous request.

C#
[TypeConverter(typeof(StringArrayConverter))]
public virtual string[] PostBackControls { get; set; }

By design ASP.NET AJAX Framework cancels the ongoing ajax request if you try to initiate another one prior to receiving the response for the first request. By setting the RequestQueueSize property to a value greater than zero, you are enabling the queuing mechanism of RadAjax that will allow you to complete the ongoing request and then initiate the pending requests in the control queue.

C#
public int RequestQueueSize { get; set; }
Property Value:

The default value is 0 (queuing disabled).

If the queue is full (queue size equals RequestQueueSize), an attempt for new ajax request will be discarded.

Gets the response scripts which represent JavaScript code that will be passed to the client and executed.

C#
[Browsable(false)]
public virtual StringCollection ResponseScripts { get; }
Property Value:

The response scripts.

RadAjax for ASP.NET has some limitations when running in medium trust. To make it work you should change the base type of your pages that use radjax from Page to RadAjaxPage. However DNN module controls Inherit from Entities.Modules.PortalModuleBase and thus you cannot simply change the page's base class. For such cases you should use the new property RestoreOriginalRenderDelegate. By default it is true, if you work in DNN or medium trust, you should set that to false.

C#
public virtual bool RestoreOriginalRenderDelegate { get; set; }
Property Value:

By default it is true, if you work in DNN or medium trust, you should set that to false.

Determines whether the loading panel will be shown during a regular postback. This will work only if the loading panel is attached to the ajax control. Default value is false (disabled).

C#
public virtual bool ShowLoadingPanelForPostBackControls { get; set; }

Methods

Displays an alert message at client-side.

C#
public void Alert(string message)
Parameters:messagestring

This is the easiest way to show a message, generated from the server, on the client in a message box.

Note: Special characteres are not escaped.

Example:
cs-api-definition
private void Button1_Click(object sender, System.EventArgs e)
{
if (!UserAccessAllowed(UserProfile))
{
RadAjaxManager1.Alert("You are not allowed to access this user control!");
}
else
{
LoadSecretControl();
}
}

Sets focus to the specified web control after the AJAX Request is finished.

C#
public virtual void FocusControl(Control controlToFocus)
Parameters:controlToFocusControl

Sets focus to the specified web control after the AJAX Request is finished.

C#
public virtual void FocusControl(string controlToFocusID)
Parameters:controlToFocusIDstring

Gets client side code which raises an AjaxRequest event in either AJAX Manager or AJAX Panel.

C#
public string GetAjaxEventReference(string argument)
Parameters:argumentstringReturns:

string

Example:
cs-api-definition
private void Page_Load(object sender, System.EventArgs e)
{
// Create a generic AJAX Request when the button is clicked.
// "return false" to prevent postbacks
Button1.Attributes["onclick"] = RadAjaxPanel1.GetAjaxEventReference("argument...") + " return false;";
// Generic requests can be fired on both AJAX Manager and AJAX Panel
Button1.Attributes["onclick"] = RadAjaxManager1.GetAjaxEventReference("argument...") + " return false;";
}
C#
protected virtual void OnAjaxRequest(AjaxRequestEventArgs args)
Parameters:argsAjaxRequestEventArgs
C#
protected virtual void OnAjaxSettingCreated(AjaxSettingCreatedEventArgs args)
Parameters:argsAjaxSettingCreatedEventArgs
C#
protected virtual void OnAjaxSettingCreating(AjaxSettingCreatingEventArgs args)
Parameters:argsAjaxSettingCreatingEventArgs
C#
protected override bool OnBubbleEvent(object source, EventArgs args)
Parameters:sourceobjectargsEventArgsReturns:

bool

Overrides: Control.OnBubbleEvent(object, EventArgs)

C#
protected virtual void OnCommand(CommandEventArgs args)
Parameters:argsCommandEventArgs
C#
protected override void OnInit(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnInit(EventArgs)

C#
protected override void OnLoad(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnLoad(EventArgs)

Redirects the page to another location.

C#
public void Redirect(string location)
Parameters:locationstring

This method is usually used in the AJAX event handler instead of Response.Redirect(). It provides the only way to redirect to a page which does not contain any AJAX control at all.

Example:
cs-api-definition
private void Button1_Click(object sender, System.EventArgs e)
{
RadAjaxManager1.Redirect("support.aspx");
}

Events

C#
public event RadAjaxControl.AjaxRequestDelegate AjaxRequest
C#
public event RadAjaxControl.AjaxSettingCreatedDelegate AjaxSettingCreated
C#
public event RadAjaxControl.AjaxSettingCreatingDelegate AjaxSettingCreating
C#
public event RadAjaxControl.CommandEventDelegate Command