在主页中使用gridview
|
我正在VS2005(VB)中创建一个新页面,它具有gridview,我的问题是,当我尝试将网格插入到ContentPlaceHolder(在设计模式下)时,它最终都在页面上的其他地方结束了。我正在使用母版页,但不确定自己在做什么错。
ASPX代码
<%@ Page Language=\"vb\" MasterPageFile=\"~/secure/Master1.Master\" CodeBehind=\"Master1.Master.vb\" Inherits=\"Main.LiveCalendar\" %>
<asp:Content ID=\"ContentPlaceHolder\" ContentPlaceHolderID=\"ContentPlaceHolder1\" runat=\"server\">
<h1>Live Calendar</h1>
<%--<asp:Label runat=\"server\" id=\"lblMessage\" Text=\"\"></asp:Label>--%>
<asp:gridview id=\"GridView1\" runat=\"server\" allowsorting=\"True\" autogeneratecolumns=\"False\"
datasourceid=\"SqlDataSource1\" style=\"z-index: 100; left: 0px; position: absolute;
top: 0px\" Height=\"101px\" Width=\"224px\"><Columns>
<asp:BoundField DataField=\"P_AE_ID\" SortExpression=\"P_AE_ID\" HeaderText=\"P_AE_ID\"></asp:BoundField>
<asp:BoundField DataField=\"P_Name\" SortExpression=\"P_Name\" HeaderText=\"P_Name\"></asp:BoundField>
<asp:BoundField DataField=\"P_Start\" SortExpression=\"P_Start\" HeaderText=\"P_Win_Start\"></asp:BoundField>
<asp:BoundField DataField=\"P_End\" SortExpression=\"P_End\" HeaderText=\"P_Win_End\"></asp:BoundField>
<asp:BoundField DataField=\"P_Status\" SortExpression=\"P_Status\" HeaderText=\"P_Status\"></asp:BoundField>
<asp:BoundField ReadOnly=\"True\" DataField=\"CountOfPED_ID\" SortExpression=\"CountOfPED_ID\" HeaderText=\"CountOfPED_ID\"></asp:BoundField>
</Columns>
</asp:gridview>
<p>
<asp:sqldatasource id=\"SqlDataSource1\" runat=\"server\" connectionstring=\"<%$ ConnectionStrings:dbConnection %>\"
selectcommand=\"web_Public\" selectcommandtype=\"StoredProcedure\"></asp:sqldatasource>
</p>
</asp:Content>
没有找到相关结果
已邀请:
1 个回复
秃拳割