rss
twitter
facebook

Home

FeedbackMessage

.ASPX AFTER
<%= this.message %>
.CSS --------------------------------------------------------------------------------- .errorBox { border:solid 2px Red; padding: 3px 3px 3px 3px; color:Red; text-align:left; } .errorImage { vertical-align:bottom; margin-bottom:-5px; } .InfoBox { border:solid 1px Blue; padding: 3px 3px 3px 3px; font-size:11px; } .InfoImage { vertical-align:bottom; margin-top:-6px; } .msbox { position: fixed; width: 400px; float:left; z-index: 8000; top: -50px; left:40%; } .msboximg { position: absolute; float: right; right: -10px; top: -10px; } .messagebox { background-color: Blue; height: 40px; text-align: center; width: 100%; } .MessageText { vertical-align: middle; margin-top: 5px; font-family: Trebuchet MS; color: White; } .userbox { background-color: #90D0f0; } .contentbox { background-color: #F5F9FF; } --------------------------------------------------------------------------------- .CS public enum MessageType{SUCCESS,WARNING,INFO,FAIL}; public void ShowMessage(string message,MessageType Type = MessageType.INFO,string MoreInfo="") { this.message = message; this.msmtext.Attributes["Title"] = MoreInfo; switch(Type) { case MessageType.FAIL: this.Messagebox.Style["background-color"] = "Red"; break; case MessageType.INFO: this.Messagebox.Style["background-color"] = "Blue"; break; case MessageType.SUCCESS: this.Messagebox.Style["background-color"] = "Green"; break; case MessageType.WARNING: this.Messagebox.Style["background-color"] = "Orange"; break; } }

0 comentários:

 
Powered by Blogger