Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Arnold Scott   on Sep 17 In Asp.net Category.

  
Question Answered By: Ryder Anderson   on Sep 17

The simplest thing to do is to use a label control and normally it will
not be visible. I also like to set the font color to red.



<asp:Label id=errMsg runat=server fore-color=red visible=false />

Then in the code, when I detect the error,

If(thatErrorThing)

{

errMsg.Text = "Some type of message";

errMsg.Visible = true;

return;

}

in the page load event, always do

errMsg.Text = "";

errMsg.Visible = false;

This will work very nicely and the user  will not have to deal with any
annoying alert window.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Client side message (dialog) box Or get search suggestion and latest updates.


Tagged: