RadAjax for ASP.NET

RadAjax Send comments on this topic.
ResponseScripts Property
See Also  Example
Telerik.WebControls.RadAjaxUtils Namespace > RadAJAXControl Class : ResponseScripts Property


Gets or sets a string collection of JavaScripts that will be executed on client-side when the response returns.   

 

Namespace: Telerik.WebControls.RadAjaxUtils
Assembly: RadAjax (in RadAjax.dll)

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property ResponseScripts As StringCollection
Visual Basic (Usage)Copy Code
Dim instance As RadAJAXControl
Dim value As StringCollection
 
value = instance.ResponseScripts
C# 
public virtual StringCollection ResponseScripts {get;}

Example

The following example demonstrates a sample usage of the ResponseScripts property:

            [C#]  
                
            <form id="Form1" method="post" runat="server">
<script language="C#" runat="server">
private void Button1_Click(object sender, System.EventArgs e)
{
RadAjaxManager1.ResponseScripts.Add("alert('This can be any script!');");
}
</script>
<radA:RadAjaxManager id="RadAjaxManager1" runat="server" >
<AjaxSettings>
<radA:AjaxSetting AjaxControlID="Button1">
<radA:AjaxSetting>
</AjaxSettings>
</radA:RadAjaxManager>
Visual BasicCopy Code
<form id="Form1" method="post" runat="server">
<script language="VB" runat="server">
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
 RadAjaxManager.ResponseScripts.Add("alert('This can be any script!');")
End Sub 'RadAjaxManager1_AjaxRequest
</script>
<radA:RadAjaxManager id="RadAjaxManager1" runat="server" >
 <AjaxSettings>
  <radA:AjaxSetting AjaxControlID="Button1">
  <radA:AjaxSetting>
 </AjaxSettings>
</radA:RadAjaxManager>

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also