Solved

Browser CS1002 ' expected error.

Posted on 2009-06-30
5
357 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
  • 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now