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

Kendo UI PromptBox component

Definition

Constructors

Initializes a new instance of the PromptBox class.

C#
public PromptBox(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContext

The view context

initializerIJavaScriptInitializer

The JavaScriptInitializer

urlGeneratorIUrlGenerator

The URL generator.

Properties

Configures the Action button (send/stop) in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

C#
public PromptBoxActionButtonSettings ActionButton { get; set; }

If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

C#
public bool? Enable { get; set; }

The handler for the EndAffixTemplate

C#
public string EndAffixTemplateHandler { get; set; }

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

C#
public PromptBoxFileSelectButtonSettings FileSelectButton { get; set; }

Defines the fill mode for the PromptBox container.

C#
public FillMode? FillMode { get; set; }

Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.

C#
public bool? Loading { get; set; }

Sets the maximum height of the textarea in pixels. The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.

C#
public double? MaxTextAreaHeight { get; set; }

Defines the localization messages for the PromptBox.

C#
public PromptBoxMessagesSettings Messages { get; set; }

Sets the mode of the PromptBox. Available options are "single", "multi", and "auto". single - Displays a single-line input field; multi - Displays a multi-line textarea with configurable rows or auto - Starts as a single line and expands automatically as the user types.

C#
public PromptBoxMode? Mode { get; set; }

Sets the placeholder text displayed in the PromptBox when it is empty.

C#
public string Placeholder { get; set; }

Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.

C#
public bool? Readonly { get; set; }

Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".

C#
public double? Rows { get; set; }

Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

C#
public PromptBoxSpeechToTextButtonSettings SpeechToTextButton { get; set; }

The handler for the StartAffixTemplate

C#
public string StartAffixTemplateHandler { get; set; }

Sets the title attribute of the input or textarea element.

C#
public string Title { get; set; }

The handler for the TopAffixTemplate

C#
public string TopAffixTemplateHandler { get; set; }

Sets the value of the PromptBox.

C#
public string Value { get; set; }

Methods

C#
public override IDictionary<string, object> Serialize()
Returns:

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

The HtmlTextWriter.

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The TextWriter.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)