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

Client-side Events

Event log

The WebForms AIPrompt supports a comprehensive set of events which enable you to provide fluent experience and smooth interaction with the component.

This demo shows how to handle the AIPrompt events and the available arguments.

  • DefaultVB.aspx
  • DefaultVB.aspx.vb
  • script.js
  • style.css
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="AIPrompt_Overview_DefaultVB"  %>

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

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <script src="script.js"></script>
    <link href="style.css" rel="stylesheet" />
</head>

<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-medium flex-center">
        <telerik:RadAIPrompt ID="RadAIPrompt1" runat="server" Width="450px">
            <Views>
                <telerik:AIPromptView Type="Prompt" />
                <telerik:AIPromptView Type="Output" />
                <telerik:AIPromptView Type="Commands">
                </telerik:AIPromptView>
            </Views>
            <PromptCommands>
                <telerik:ViewPromptCommand ID="Command1" Text="Simplify" Icon="min-width" />
                <telerik:ViewPromptCommand ID="Command2" Text="Extend" Icon="arrows-left-right" />
            </PromptCommands>
            <ClientEvents OnLoad="onLoad" OnPromptRequest="onPromptRequest" OnCommandExecute="onCommandExecute" OnOutputCopy="onOutputCopy" OnOutputRatingChange="onOutputRatingChange" />
        </telerik:RadAIPrompt>
    </div>

    <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true" Height="300px"></qsf:EventLogConsole>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance