Try This

public void Msg(String ex, Page pg, Object obj)

{

String s = "<SCRIPT language='javascript'>alert('" + ex.Replace("\r\n",
"\\n").Replace("'", "") + "'); </SCRIPT>";

Type cstype = obj.GetType();

ClientScriptManager cs = pg.ClientScript;

cs.RegisterClientScriptBlock(cstype, s, s.ToString());

}

Message.Msg("Message Text",Page,This);

On 8/12/09, smiling eyes <[email protected]> wrote:
>
>  hi,
> can anybody tell me how to add message box /  alert box in ASP.net web page
> .
> i am  using C# as codebehind language.
> my intension is i'm developing one webpage in that i have some required
> fields for that i need to use alertbox instead of validators....
>



-- 
Jagat Patel
+91 09825771274
[email protected]
[email protected]
[email protected]

Reply via email to