程序test.aspx能够运行正常
test.aspx
<Script Language = "VB" Runat = "Server">
Sub Page_Load(Sender As Object, e As EventArgs)
a1.Style("font-Style") = "Italic"
a1.Href = "http://www.sina.com"
a1.Title = "http://www.sina.com"
a1.Target = "_self"
a1.InnerText = "新浪网站"
End Sub
</Script>
<Html>
<Center>
<Form Runat = "Server">
<A ID = "a1" Runat = "Server" />
</Center>
</Form>
<Html> 但程序test01.aspx和test.aspx.vb不能正常运行
test01.aspx
<Html>
<Center>
<Form Runat = "Server">
<P><A Href = "http://www.sina.com" ID = "a1" Runat = "Server">默认去往新浪</A></P>
<Input ID = "Button1" Value = "链向新浪" Type = "Button" Runat = "Server" />
<Input ID = "Button2" Value = "链向网易" Type = "Button" Runat = "Server" />
</Form>
</Html> test02.aspx.vb Public Class WebForm1
Inherits System.Web.UI.Page
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.ServerClick
a1.InnerText = "去往新浪"
a1.Href = "http://www.sina.com"
End Sub
Private Sub Button2_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button2.ServerClick
a1.InnerText = "去往网易"
a1.Href = "http://www.163.com"
End Sub
End Class 怎么回事?我使用的是WinXP_SP2,没有安装VS,而是安装.NET Framework,不知道是不是因为没有安装VS这个问题,谁能帮我试一下。
谢谢
test.aspx
<Script Language = "VB" Runat = "Server">
Sub Page_Load(Sender As Object, e As EventArgs)
a1.Style("font-Style") = "Italic"
a1.Href = "http://www.sina.com"
a1.Title = "http://www.sina.com"
a1.Target = "_self"
a1.InnerText = "新浪网站"
End Sub
</Script>
<Html>
<Center>
<Form Runat = "Server">
<A ID = "a1" Runat = "Server" />
</Center>
</Form>
<Html> 但程序test01.aspx和test.aspx.vb不能正常运行
test01.aspx
<Html>
<Center>
<Form Runat = "Server">
<P><A Href = "http://www.sina.com" ID = "a1" Runat = "Server">默认去往新浪</A></P>
<Input ID = "Button1" Value = "链向新浪" Type = "Button" Runat = "Server" />
<Input ID = "Button2" Value = "链向网易" Type = "Button" Runat = "Server" />
</Form>
</Html> test02.aspx.vb Public Class WebForm1
Inherits System.Web.UI.Page
Private Sub Button1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.ServerClick
a1.InnerText = "去往新浪"
a1.Href = "http://www.sina.com"
End Sub
Private Sub Button2_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button2.ServerClick
a1.InnerText = "去往网易"
a1.Href = "http://www.163.com"
End Sub
End Class 怎么回事?我使用的是WinXP_SP2,没有安装VS,而是安装.NET Framework,不知道是不是因为没有安装VS这个问题,谁能帮我试一下。
谢谢
导致缺少一个.design文件
去微软官方下载!
新建立一个项目后添加引用!
去微软官方下载!
新建立一个项目后添加引用!