FineUI 官方论坛
标题:
代码页中无法找到页面上的控件?
[打印本页]
作者:
lgj88lj99
时间:
2014-5-24 16:41
标题:
代码页中无法找到页面上的控件?
页面中是这样写的,但代码页无法找到Grid1
<body>
<form id="form1" runat="server">
<f
ageManager ID="
ageManager1" runat="server" />
<f
anel Layout="VBox" BoxConfigAlign="Stretch" BoxConfigPosition="Start" BoxConfigPadding="5" BoxConfigChildMargin="0 0 5 0" runat="server" ID="fillPanel" ShowHeader="true" Title="添加管理员">
<Items>
<f:Form ID="fillForm" ShowBorder="False" BodyPadding="5px" ShowHeader="False" runat="server">
<Rows>
<f:FormRow>
<Items>
<f:TextBox ID="tloginName" Label="登录名" runat="server" Width="400px" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
<f:TextBox ID="tuserName" Label="姓名" runat="server" Width="400px" MaxLength="50"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="tpasswd" Label="密码" runat="server" TextMode="
assword" Width="400px" MaxLength="30" Required="true" ShowRedStar="true"></f:TextBox>
<f:Button ID="btnAdd" Text="添加用户" runat="server" ValidateForms="fillForm"></f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
<f:Grid ID="Grid1" Title="管理员列表" EnableFrame="false" EnableCollapse="true" ShowBorder="true" ShowHeader="true" runat="server" DataKeyNames="ID,loginName" Width="800px">
<Columns>
<f:RowNumberField />
<f:BoundField DataField="loginName" DataFormatString="{0}" HeaderText="登录名" ExpandUnusedSpace="True" />
<f:BoundField Width="100px" DataField="userName" DataFormatString="{0}" HeaderText="用户名" />
<f:TemplateField HeaderText="编辑" Width="60px">
<ItemTemplate>
<a href="javascript:<%# GetEditUrl(Eval("ID"), Eval("loginName")) %>">编辑</a>
</ItemTemplate>
</f:TemplateField>
</Columns>
</f:Grid>
<f:Window ID="Window1" Title="编辑" Hidden="true" EnableIFrame="true" runat="server" CloseAction="HidePostBack" EnableMaximize="true" EnableResize="true" Target="Top"
IsModal="True" Width="850px" Height="450px">
</f:Window>
</Items>
</f
anel>
</form>
</body>
代码页中:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack) {
Grid1.DataSource = new List().Load();
Grid1.DataBind();
}
}
提示Grid1无法找到,什么原因呀?直接用的最新版的空白项目!
作者:
lgj88lj99
时间:
2014-5-24 17:00
重启电脑就好了,无语!
作者:
boy221100
时间:
2014-5-26 11:30
using FINeUI
欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/)
Powered by Discuz! X3.4