Link to home
Start Free TrialLog in
Avatar of justin11
justin11

asked on

MessageBox and VB.net

Hello,

I have created message box using Javascript. It doesn' t work. Can any one please tell me what  the problem is?

Dim sMessage as String
sMessage  = "Test"
Dim js As String = "<script language='javascript'>alert(sMessage);</script>"
        RegisterStartupScript("msgbox", js)
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Hi justin11;

I believe it should be this way

Dim js As String = "<script language='javascript'>alert(" & sMessage & ");</script>"

Fernando
ASKER CERTIFIED SOLUTION
Avatar of smoee
smoee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your right I missed that. Thanks