Solved

Browser CS1002 ' expected error.

Posted on 2009-06-30
5
363 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 500 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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