?
Solved

Browser CS1002 ' expected error.

Posted on 2009-06-30
5
Medium Priority
?
365 Views
Last Modified: 2013-11-08
Searching for a solution to solve the error, thanks Experts!!!

Compiler Error Message: CS1002: ; expected

Source Error:

 

Line 3:  <script runat="server">
Line 4:  
Line 5:      Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Line 6:  
Line 7:      End Sub
 
0
Comment
Question by:Levi Martin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 9

Expert Comment

by:AsishRaj
ID: 24749564
There is probably a line of code somewhere  that is missing a semicolon and the compiler thinks this is a continued line and expects a semicolon. Or you are missing an bracket somewhere in a method and it thinks this is part of the previous method rather than a method declaration.

0
 

Author Comment

by:Levi Martin
ID: 24749754
Well, it's system generated from Visual Web Developer 2008 and I'm a SQL DBA so this is all fairly new to me. The whole code segment looks like:
<script runat="server">
 
    Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
 
    End Sub
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
 
    End Sub
 
    Protected Sub txtExecutive_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
 
    End Sub
 
    Protected Sub SqlDataSource5_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)
 
    End Sub
 
    Protected Sub SqlDataSource_EVP_LeadingThroughVisionAndValues_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)
 
    End Sub
 
    Protected Sub FormView2_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewPageEventArgs)
 
    End Sub
 
    Protected Sub FormView_NextJobLevels_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewPageEventArgs)
 
    End Sub
</script>

Open in new window

0
 
LVL 9

Accepted Solution

by:
AsishRaj earned 2000 total points
ID: 24750065
I think you are writing in VB but Compiling in C#

At top of the page you have  this
<%@ Page Language="C#" %>

Change it to

<%@ Page Language="VB" %>

Let me know of the outcome.
0
 
LVL 9

Expert Comment

by:AsishRaj
ID: 24750525
Can you post the code for the whole page so i can say what language are you using and then i can give you the correct response in relation to that.
0
 
LVL 9

Expert Comment

by:AsishRaj
ID: 24750535
This is a small error which can be solved in matter of minutes only if we know what language you are using.

Reason for stating this is you selected C# zone but you are posting VB codes
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question