Object should be passed in to view end rendered with <%= ((ErrorDisplay) ViewData["ErrorDisplay"]).Show(450,true) %>
public class ErrorDisplay : object
Member | Description | |
---|---|---|
Constructor | ||
AddMessage | Adds an individual model error public void AddMessage(string errorMessage,
string control); |
|
AddMessages | Adds ModelState errors to the validationErrors public void AddMessages(ModelStateDictionary modelErrors,
string fieldPrefix); public void AddMessages(ValidationErrorCollection validationErrors,
string fieldPrefix); |
|
Render | Method public HtmlString Render(int width,
bool center); |
|
ShowError | public void ShowError(string errorMessage);
|
|
ShowMessage | public void ShowMessage(string message);
|
|
DisplayErrors | Holds a modelstate errors collection | |
HtmlEncodeMessage | Flag that determines whether the message is displayed as HTML or as text. By default message is encoded as text (true). | |
Message | The message that is displayed |