日期:2014-05-16 浏览次数:20380 次
<ext:Window ID="window1" runat="server" Width="350" AutoHeight="true" Title="新增" Hidden="true" Icon="Textfield" Padding="10" LabelWidth="100"> <Items> <ext:TextField ID="txtName" runat="server" InputType="Text" FieldLabel="用户名" AnchorHorizontal="90%"></ext:TextField> </Items> <Buttons> <ext:Button ID="Button1" Text="保存" Icon="TableSave" Width="70" runat="server"> <DirectEvents> <Click OnEvent="Button_Click"><EventMask ShowMask="true" Msg="正在保存......" /></Click> </DirectEvents> </ext:Button> </Buttons> </ext:Window>
protected void Button_Click(object sender, DirectEventArgs e) { if (string.IsNullOrEmpty(this.txtName.Text)) { X.Msg.Alert("提示", "用户名不能为空").Show(); } else { X.Msg.Alert("提示", "保存成功!").Show(); } }