Creating Alert Control in ASP.NET

Dheeraj Kumar Gunti

Reading Time : ( words)

Following is the process for creating Alert Control in ASP.NET
Step 1: Add Web User Control to your web application.

Step 2: Add css for the web user control

Step 3: Create following methods for accessing alert control

Step 4: Add a web page for accessing the alert control
Step 5: Following is the code to access the control.

MessageBox.SetMessage("An example of an error message!", MessageboxControl.MessageType.Warning);

Output will be show as below:

For Warning - MessageboxControl.MessageType.Warning

For Success - MessageboxControl.MessageType.Warning

For Error - MessageboxControl.MessageType.Warning