VB.NET syntax error

FakerHotel

New Member
Hi,<BR><BR>What's the problem with this code ? It is giving error:<BR>Line 6 End of statement expected.<BR><BR><BR>Line 4: <BR>Line 5: <script language = "VB" runat="Server"><BR>Line 6: private void btnSubmit_click(Sender as Object, E as EventArgs) {<BR>Line 7: lblcolor.BackColor = System.Drawing.Color.Red;<BR>Line 8: }<BR><BR>THANKSeither of these should work<BR><BR>Line 4: <BR>Line 5: <script language = "C#" runat="Server"><BR>Line 6: private void btnSubmit_click(Sender as Object, E as EventArgs) {<BR>Line 7: lblcolor.BackColor = System.Drawing.Color.Red;<BR>Line 8: }<BR><BR>or<BR><BR>Line 4: <BR>Line 5: <script language = "VB" runat="Server"><BR>Line 6: private sub btnSubmit_click(Sender as Object, E as EventArgs)<BR>Line 7: lblcolor.BackColor = System.Drawing.Color.Red<BR>Line 8: end subI'm certainly no VB expert, but it looks like you are attempting to code in C# when your declaration says VB.
 
Back
Top