尝试我可能无法克服这个错误。我不是 ASP.Net 开发人员,但由于我无法控制的原因,我必须在 ASP 中开发 2-3 页。
我正在使用 Dreamweaver 并将 asp.net 设置为在首次加载时进行编译。
.aspx 文件
<%@ Page Language="vb" AutoEventWireup="false" Src="Scripts/CurrentNews.aspx.vb" Inherits="NewsFunctionality" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>News</title>
<link rel="stylesheet" type="text/css" href="CSS/NewsLayoutOne.css"/>
</head>
<body>
<div class="OuterDiv" runat="server">
<img id="NewsImage" src="Images/DefaultNews1.png" >
<div id="NewsBody" runat="server">Original Text</div>
</div>
</body>
</html>
.aspv.vb 文件
' VB Document
public partial Class NewsFunctionality
Inherits System.Web.UI.Page
'On load event for the page linked to this class file
protected sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
NewsBody.InnerHTML = "<p>Dynamic Text Generated.</p>"
End Sub
End Class