新手刚学习function Pass () {
if(LGForm.form.isValid()) {
LGForm.form.submit({
url:'LoginPage_Service.aspx',
waitTitle:"请稍候",
method:'POST',
waitMsg:"正在提交数据,请稍候....",success:function (form,action) {
var loginResult=action.result.success;
if(loginResult==false) {
Ext.MessageBox.alert('提示',action.result.message);
}else if(loginResult==true) {
window.location.href='Managementframework.aspx';
}
},failure:function (form,action) {
Ext.MessageBox.alert('提示',action.result.message);
//_window.getComponent('LGForm').form.reset();
}
});
}
}
我如何在LoginPage_Service.aspx 这个页面获取用户名密码啊,现在加载不过去出错!~获取代码        Response.Write(Request.Form["username"].ToString());
        Response.Write(Request.Form["password"].ToString());
        Response.Write(Request.Form["verifycode"].ToString());

解决方案 »

  1.   

    Ext.BLANK_IMAGE_URL="ExtJs_2_3_0/resources/images/default/s.gif";
    Ext.QuickTips.init();
    Ext.onReady(function (){
    scode=function(){
    Ext.getDom("imgcode").src="Confir.aspx?			CodeLen=4&Fineness=95&ImgWidth=71&ImgHeight=18&PosX=4&PosY=0&FontName=Bookman Old Style&FontSize=14&FontStyle=3?dt=" + (new Date()).getTime();
    }
    var LGForm=new Ext.FormPanel({
    el:'hello-tabs',
    name:'LGForm',
    title:'学习1.0“,
    bodyStyle:"padding:10 5 10 5px",
    contentEl:'loginInfo',
    layout:'form',
    frame:true,
    border:false,
    keys:[{key: [10,13],fn:Pass}],
    defaults:{
    width:230
    },
    items:[{
    xtype:"textfield",
    fieldLabel:'用户名',
    name:'username',
    allowBlank:false
    },
    {
    xtype:"textfield",
    fieldLabel:'密   码',
    name:'password',
    inputType:'password',
    allowBlank:false
    },
    {
    xtype:'panel',
    defaults:{border : false,frame:false},
    style:'border-left: 0px solid #000000;',
    width:458,
    layout:'column',
    items:[{
    columnWidth:.6,
    layout : 'form',
    items:[{ xtype:'textfield',
    width:180,
    fieldLabel : '验证码',
    name : 'verifycode',
    allowBlank:false,
    anchor : '98%'}]
    },{
    xtype:'panel',
    columnWidth:.4,
    html:"<img src='Confir.aspx?&#9;&#9;&#9;CodeLen=4&amp;Fineness=95&amp;ImgWidth=71&amp;ImgHeight=18&amp;PosX=4&amp;PosY=0&amp;FontName=Bookman Old Style&amp;FontSize=14&amp;FontStyle=3' id='imgcode' width='60' height='21'>"
    }]
    }
    ]
    });
    var _window=new Ext.Window({el:'hello-win',
    frame:true,
    width:420,
    height:278,
    layout:"fit",
    closeAction:'close',
    modal:true,
    collapsible:true,
    draggable:true,
    resizable:false,
    closable:true,
    buttonAlign:"center",
    bodyStyle:"padding:1 1 1 1px",
    labelWidth:40,
    items:[LGForm],buttons:[{
    text:"登 陆(Login)",
    handler:Pass
    },
    {
    text:"关 闭(Close)",
    handler:function () {
    _window.close();
    }
    }]
    });
    function Pass () {
    if(LGForm.form.isValid()) {
    LGForm.form.submit({
    url:'LoginPage_Service.aspx',
    waitTitle:"请稍候",
    method:'POST',
    waitMsg:"正在提交数据,请稍候....",success:function (form,action) {
    var loginResult=action.result.success;
    if(loginResult==false) {
    Ext.MessageBox.alert('提示',action.result.message);
    }else if(loginResult==true) {
    window.location.href='Managementframework.aspx';
    }
    },failure:function (form,action) {
    Ext.MessageBox.alert('提示',action.result.message);
    //_window.getComponent('LGForm').form.reset();
    }
    });
    }
    }_window.show();
    });
      

  2.   

      Response.Write(Request["username"].ToString());
      Response.Write(Request["password"].ToString());
      Response.Write(Request["verifycode"].ToString());
    这么取试试行不行。