FineUI 官方论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

本论坛已关闭(禁止注册、发帖和回复)
请移步 三石和他的朋友们

FineUI首页 WebForms - MVC & Core - JavaScript 常见问题 - QQ群 - 十周年征文活动

FineUI(开源版) 下载源代码 - 下载空项目 - 获取ExtJS - 文档 在线示例 - 版本更新 - 捐赠作者 - 教程

升级到 ASP.NET Core 3.1,快、快、快! 全新ASP.NET Core,比WebForms还简单! 欢迎加入【三石和他的朋友们】(基础版下载)

搜索
查看: 2578|回复: 1
打印 上一主题 下一主题

老大进来帮我看看。一个关于Window控件的问题!

[复制链接]
跳转到指定楼层
楼主
发表于 2012-8-31 16:33:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 猪八戒 于 2012-9-1 23:57 编辑

这是示例代码中登陆模块。把这个弹出窗口改成最上层(Target="Top">)就无法获取到里面TextBox 的值。
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <extageManager ID="ageManager1" runat="server"/>
    <ext:Window ID="Window1" Title="系统登录" runat="server" IsModal="true" Width="350px" WindowPosition="GoldenSection" EnableClose="false" Target="Top">
        <Items>
            <ext:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="false" BodyPadding="10px" LabelWidth="60px" EnableBackgroundColor="true" ShowHeader="false">
                <Items>
                    <ext:TextBox ID="tbxUserName" Label="用户名" Required="true" runat="server">
                    </ext:TextBox>
                    <ext:TextBox ID="tbxPassword" Label="密码" TextMode="assword" Required="true" runat="server">
                    </ext:TextBox>
                    <ext:Button ID="btnLogin" Text="登录" Type="Submit" ValidateForms="SimpleForm1" ValidateTarget="Top" runat="server">
                    </ext:Button>
                </Items>
            </ext:SimpleForm>
        </Items>
    </ext:Window>
    </form>
</body>
</html>

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (Login(tbxUserName.Text, tbxPassword.Text))
            {
                Alert.ShowInTop("登陆成功!", MessageBoxIcon.Error);
            }
            else
            {
                Alert.ShowInTop("用户名或密码错误!", MessageBoxIcon.Error);
            }
        }
点击按钮,查看两个TextBox的值都是空("")。这是怎么回事?要怎么才能获取到控件的值!
沙发
发表于 2012-9-5 10:15:24 | 只看该作者
我也碰到同样的问题,而且还发现如果设为Target="Top"后,验证提醒的弹出窗口不显示出来了,显示Window的后层  
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|FineUI 官方论坛 ( 皖ICP备2021006167号-1 )

GMT+8, 2024-9-28 05:25 , Processed in 0.043599 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表