Web Messages

  • Thread starter Thread starter jack-b
  • Start date Start date
J

jack-b

Hi,

I was wondering what are best practices when it comes to displaying
messages in a web project?

I currently have a resource class where I keep all messsages (welcome,
error, etc messages)

Cheers,
Jack
 
Hi

There is a server side solution...

string script = "<script> window.alert(\"" + "Invalid End Time" +
"\"); </script>";
RegisterStartupScript("close",script);

Regards,

Daniel Roth
MCSD.NET
 
Jack,

The best way is to use client-side javascript alert call. If you need to
show a message, pass it from server to client side in a hidden input and
make a client onload event that will check the value of the input and, if it
is not empty, call the alert with the input value as the message text.

Eliyahu
 
Having a resource class where all your messages are is a very good
idea,

Then when you need to use a message in multiple locations you just use
the reference the one class,

later on if you need to changea message, just change it in one place

The UIP application black uses a resource manager to do this
 
Back
Top