Skip to content
This repository has been archived by the owner on Oct 25, 2019. It is now read-only.

Message box

Alexanderius edited this page Jan 1, 2019 · 1 revision

MessageBox is a class for message box HTML generation.

It uses files from Templates folder/AcspNet/MessageBox/

Used files: ErrorMessageBox.tpl, InfoMessageBox.tpl, OkMessageBox.tpl and InlineErrorMessageBox.tpl, InlineInfoMessageBox.tpl, InlineOkMessageBox.tpl

This files should contain {Message} template variable.

The message boxes devided by 3 types: Ok, Error, Info.

Generating message box

	public class MyController : Controller
	{
		public override ControllerResponse Invoke()
		{
			// This call will load InfoMessageBox.tpl, sets the "some text" to it and puts it to "MainContent" variable of "DataCollector"
			Html.MessageBox.Show("some text", MessageBoxStatus.Information);
			...
		}
	}

Generating inline message box

	public class MyController : Controller
	{
		public override ControllerResponse Invoke()
		{
			// This call will load InlineErrorMessageBox.tpl, sets the "some text" to it and returns generated HTML
			var mbText = Html.MessageBox.GetInline("some text");
			...
		}
	}

It is recommended to use respective MessageBox and MessageBoxInline controller responses instead of MessageBox directly.

<< Previous page Next page >>

Clone this wiki locally