母版调用出现的问题,请大家帮忙解决?

zjhydx98 2008-12-11 08:30:43
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="hyqc.aspx.vb" Inherits="_Default" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td align="left" style="font-size: 0.8em; width: 1193px; font-family: 宋体; height: 15px;
background-color: gainsboro">
名称:<asp:TextBox ID="TextBox1" runat="server" Width="99px"></asp:TextBox>
单价:<asp:TextBox ID="TextBox2" runat="server" Width="45px"></asp:TextBox>
单位:<asp:TextBox ID="TextBox3" runat="server" Width="45px"></asp:TextBox>
类别:<asp:TextBox ID="TextBox4" runat="server" Width="69px"></asp:TextBox>
产地:<asp:TextBox ID="TextBox5" runat="server" Width="72px"></asp:TextBox></td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 1193px; font-family: 宋体; background-color: gainsboro">
说明:<asp:TextBox ID="TextBox6" runat="server" Width="395px">暂无</asp:TextBox><asp:Button
ID="Button1" runat="server" Text="新增" Width="59px" /><asp:Button
ID="Button2" runat="server" Text="修改" Width="62px" /></td>
</tr>
<tr>
<td style="width: 100px; height: 267px">
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
BorderWidth="1px" CellPadding="3" DataKeyNames="名称" DataSourceID="SqlDataSource1"
EmptyDataText="没有可显示的数据记录。" Font-Names="宋体" Font-Size="Small" GridLines="Vertical"
Height="144px" PageSize="8" Width="554px">
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
<Columns>
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" />
<asp:TemplateField HeaderText="删除" ShowHeader="False">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete"
Text="删除" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="名称" HeaderText="名称" ReadOnly="True" SortExpression="名称" />
<asp:BoundField DataField="单价" HeaderText="单价" SortExpression="单价" />
<asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" />
<asp:BoundField DataField="类别" HeaderText="类别" SortExpression="类别" />
<asp:BoundField DataField="产地" HeaderText="产地" SortExpression="产地" />
<asp:BoundField DataField="说明" HeaderText="说明" SortExpression="说明" />
</Columns>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="Gainsboro" />
</asp:GridView>

</td>
</tr>
</table>
</asp:Content>

错误 1 “Context”不是“_Default”的成员。 C:\Inetpub\hydjxt\hyqc.aspx 3 1 C:\Inetpub\hydjxt\
错误 2 “Context”不是“_Default”的成员。 C:\Inetpub\hydjxt\hyqc.aspx 3 1 C:\Inetpub\hydjxt\


在调用母版出现的以上这个问题,找了很久,都不知道是什么问题,请大家帮忙解决?
...全文
103 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jinglecat 2008-12-11
  • 打赏
  • 举报
回复
1.
代码中哪里使用了 Context ?

2.
CodeFile="hyqc.aspx.vb" Inherits="_Default"
======
确定 hyqc.aspx.vb 中的类名是 _Default 吗?
lishyygh1 2008-12-11
  • 打赏
  • 举报
回复
up
net_xiaojian 2008-12-11
  • 打赏
  • 举报
回复
up 1

Inherits="web项目名称_文件夹名称_aspx页面名称" //有文件夹加文件夹名称。
wuyq11 2008-12-11
  • 打赏
  • 举报
回复
CodeFile="hyqc.aspx.vb" Inherits="hyqc"
孤独侠客123 2008-12-11
  • 打赏
  • 举报
回复
Inherits="_Default"


Inherits="Admin.Article.Article_Add"

Inherits应该是你的命名空间,加你的类的


62,269

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧