一个怪问题?????
lojo 2002-03-26 03:33:10 我从微软下载了 .net frameworks sdk. 安装在我的机器(win2k server+sp2)上然后从文档中copy了一个asp.net的例子,可以正常运行。然后我把其中的vb代码改称c#的,再运行时报错:“Compiler Error Message: CS1595: 'object' is defined in multiple places; using definition from 'D:\winnt\microsoft.net\framework\v1.0.3705\mscorlib.dll'“
我的源代码是:
<script language="VB" runat=server>
Sub Button1_Click(Sender As Object, E As EventArgs)
if Button1.text = "Button Control原始文字內容" then
Button1.Text = "改變Button Control的文字內容"
else
Button1.Text = "改變Button Control的文字內容"
end if
End Sub
</script>
改成C#后的代码是
<script language="C#" runat=server>
void Button1_Click(Object sender, EventArgs E) {
if (Button1.Text == "Button Control原始文字內容") {
Button1.Text = "改變Button Control的文字內容";
}
else {
Button1.Text = "Button Control原始文字內容";
}
}
</script>