compiler-errors - 编译器错误信息 CS1002 : ; expected

标签 compiler-errors

我收到以下错误:

编译错误
说明:在编译服务此请求所需的资源期间发生错误。请查看以下特定错误详细信息并适当修改您的源代码。

编译器错误消息:CS1002:;预期的

源错误:

第 5 行:
第 6 行:
第 7 行:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
第 8 行:
第 9 行:结束子

    <%@ Master Language="C#" Codebehind="SimplePage.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    End Sub

    Protected Sub MyMenu_MenuItemClick(sender As Object, e As MenuEventArgs)

    End Sub
</script>

最佳答案

不能在一个页面中混合 C# 和 VB 代码。

您可以免费使用Telerik Code Converter将VB转换为C#。

protected void Page_Load(object sender, System.EventArgs e)
{
}

protected void MyMenu_MenuItemClick(object sender, MenuEventArgs e)
{
}

关于compiler-errors - 编译器错误信息 CS1002 : ; expected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28288799/

相关文章:

excel - 编译错误: Argument not optional error when I call macro from other macro

Kubernetes:将 YAML 转换为 JSON 时出错:yaml:第 12 行:未找到预期的 key

android - 编译语言res文件时出现AAPT错误

C2065 我所有的 for 循环都出现错误

C++ STL 映射类型定义错误

java - 找不到Javac命令提示编译类别

c语法问题w/some changes now

.net - 从表创建导航/关联以在 EF 4.0 中查看

c++ - 错误 C2280 : attempting to reference a deleted function

compilation - cocos2dx3.10 android 编译错误