Click here to Skip to main content
15,907,493 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i unable to show message box in asp page using vb coding.. i tried in alert method using javascript but it showing some error message. i attached my error coding below:


Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.


Compiler Error Message: BC30452: Operator '&' is not defined for types 'String' and 'System.Web.UI.HtmlControls.HtmlGenericControl'.


Source Error:

Line 226:         System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf)
Line 227:
Line 228:        System.Web.HttpContext.Current.Response.Write("alert(""" & Message & """)" & vbCrLf)
Line 229:
Line 230:        System.Web.HttpContext.Current.Response.Write("</SCRIPT>")



please help to show the textbox..

regards,

sasikumar
[EMAIL DELETED]
MCAMDOIS

[edit]Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
Code block added, and multiply escaped characters revereted to normal. - OriginalGriff[/edit]
Posted
Updated 24-Oct-10 4:48am
v2

1 solution

Dim msg As String = "Hello!"
Response.Write(String.Format("<script type='text/javascript'>alert('{0}');</script>", msg))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900