マスターページで設定されているコンテンツページに文字列を表示しようとしていますが、エラーメッセージが表示されます:'compid'は 'ASP .test_master」ここマスターページの文字列がコンテンツページに表示されます
だ私のマスターページのコード:
<%@ Master Language="VB" debug="true" %>
<script runat="server">
Dim compid As String = "test"
</script>
<html>
<head></head>
<body>
<asp:ContentPlaceHolder id="CPHLoginButton" runat="server" />
</body>
</html>
そして、私のコンテンツページのコード:
<%@ Page Language="VB" MasterPageFile="test.master" %>
<%@ MasterType virtualpath="~/test.master" %>
<asp:Content ContentPlaceHolderId="CPHLoginButton" runat="server">
<%= Master.compid %>
</asp:Content>
任意のアイデアは?