Solved

Browser CS1002 ' expected error.

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

737 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