尽快!!!我需要帮助,我的Google虚拟键盘.无法检测到我在键盘上按了什么.非常感谢. [英] ASAP!!! I need help, my google virtual keybord. Cannot detect what i had pressed on the keyboard. Thanks a lot.

查看:84
本文介绍了尽快!!!我需要帮助,我的Google虚拟键盘.无法检测到我在键盘上按了什么.非常感谢.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的aspx页面

My aspx page

<%@ Page Title="" Language="C#" MasterPageFile="~/Login.master" AutoEventWireup="true" CodeFile="LoginPage.aspx.cs" Inherits="LoginPage" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <style type="text/css">

        body {
            overflow: auto;
            overflow-x: hidden;
                    }

        .style1
        {}
        .style2
        {
            width: 400px;

        }
        a:hover {
        text-decoration: underline;
        color:Gray;
        }
        a:link {
        text-decoration: none;
        color:Gray;
        }
        a:visited {
        text-decoration: none;
        color:Gray;
        }
        .style3
        {
            height: 50%;
        }
        .style4
        {
            height: 38px;
        }




    </style>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<script type="text/javascript" src="https://www.google.com/jsapi?key=ABQIAAAATQbYz0FuXv3BgNpr4MYf8hSZFbggFCEknp_8re3MNkEBPmGKfRT9PKBTA7lUEKlqi5HPoOjkJ-eHDQ"></script>
    <script type="text/javascript">

        // Load the Google Onscreen Keyboard API
        google.load("elements", "1", {
            packages: "keyboard"
        });

        function onLoad() {
            var kbd = new google.elements.keyboard.Keyboard(
          [google.elements.keyboard.LayoutCode.ENGLISH],
          ['txtUsername']);
            var kbd1 = new google.elements.keyboard.Keyboard(
          [google.elements.keyboard.LayoutCode.ENGLISH],
          ['txtPassword']);
        }

        google.setOnLoadCallback(onLoad);

    </script>


 <table style="width:100%;">

        <tr>
            <td class="style1" style="vertical-align: middle; text-align: center;">
                <table style="width:100%;">
                   <tr>
                        <td class="style3">
                            </td>
                    </tr>
                    <tr>
                        <td style="background-position: center center; background-image: url('Images/Items/Login.png'); background-repeat: no-repeat; height: 410px;">
                            <table style="width:100%; font-family: Arial;">
                                <tr>
                                    <td class="style2">
                                       </td>
                                    <td class="style2" >
                                        <br /><br /> <br /><br /></td>
                                    <td class="style2">
                                        </td>
                                </tr>
                                <tr>
                                    <td class="style2">
                                    </td>
                                    <td class="style2" rowspan="3" >
                                        <asp:Panel ID="panelLogin" runat="server" DefaultButton="btnLogin">



                                            Username :&nbsp;


                                        <asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>


                                            <br/>
&nbsp;
                                            <br />
                                            Password :
                                       <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                                            <br />

                                        <br />
                                        <asp:Button ID="btnLogin" runat="server" onclick="btnLogin_Click"

                                            Text="Login" style="height: 26px" />

                                        </asp:Panel>
                                    </td>
                                    <td class="style2">
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td class="style4">
                                        </td>
                                    <td class="style4">
                                        </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <br /><asp:Label ID="lblError" runat="server" Font-Size="Small" ForeColor="Red"></asp:Label>
                                        <br />
                                        <div style="text-align: right; padding-right: 15%;">
                                            <asp:LinkButton ID="LinkButton1" runat="server" Font-Size="Small"

                                                onclick="LinkButton1_Click" >Forget Password?</asp:LinkButton>
                                        &nbsp;</div>
                                        <br />
                                    </td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                            </table>

                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>

</asp:Content>





我的母版页





My Master page

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Login.master.cs" Inherits="Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>

    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>

</head>
<body bgcolor = "3a3a3a">

    <form id="form1" runat="server">
    <div>
        <table style="width: 106%; text-align:center; border-collapse: collapse; margin-left: -3%; margin-top: -1%;">
            <tr>
                <td  id="headerTD1">



                    <br />



                </td>
            </tr>
            <tr>
                <td id="headerTD2">
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">

                    </asp:ContentPlaceHolder>
                </td>
            </tr>
        </table>



    </div>
    </form>
    </body>
</html>




我的CS页面




My cs page

using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class LoginPage : System.Web.UI.Page
{
    Functions ft = new Functions();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            lblError.Text = "";
            

        }
        Session["counter"] = 0;

               

    }
  protected void btnLogin_Click(object sender, EventArgs e)
    {
        int status = ft.Login(txtUsername.Text, txtPassword.Text);

        if (status == 1)
        {
            Session["user"] = txtUsername.Text;
            Session["userType"] = "admin";
            ArrayList settings = ft.getSettings(txtUsername.Text);
            Session["senderName"] = settings[3];
            Session["smsAccUser"] = settings[1];
            Session["smsAccPass"] = settings[2];
            Session["logged"] = "in";
            Response.Redirect("admin/master/adminhomepage.aspx");
        }
        if (status == 2)
        {
            Session["user"] = txtUsername.Text;
            Session["userType"] = "staff";
            ArrayList settings = ft.getSettings(txtUsername.Text);
            Session["senderName"] = settings[3];
            Session["smsAccUser"] = settings[1];
            Session["smsAccPass"] = settings[2];
            Session["logged"] = "in";
            Response.Redirect("staff/master/staffhomepage.aspx");
        }
        if (status == 0)
        {
            lblError.Text = "Invalid Login";
        }
    }


    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Session["user"] = "forgetpassword";
        Response.Redirect("forgetpassword.aspx");
    }
/*
    protected override void OnInit(EventArgs e)
    {
        (Master as AdminMaster).EnforceSSL = true;
        base.OnInit(e);
    }
*/
}

推荐答案

这是一个巨大的代码转储和帮助,我无法编程"消息.您应该将其分解为最简单的版本,然后添加一些位,直到找出哪一部分可以破解为止.您的信息读起来就像您需要做的一样,请阅读手册.当我们免费为您提供帮助时,您也不应发布尽快帮助"的消息.最后,在发布代码示例时,您应该对编程有足够的了解,只发布重要的行,而不发布项目中的所有代码.
This is a huge code dump and a ''help, I can''t program'' message. You should break this down to the simplest version that works, then add bits until you work out which piece breaks it. Your message reads like what you need to do, is read the manual. You should also not post messages that say ''Help ASAP'', when we help you for free. Finally, when you post a code sample, you should know enough about programming to post only the lines that matter, not all the code in your project.


这篇关于尽快!!!我需要帮助,我的Google虚拟键盘.无法检测到我在键盘上按了什么.非常感谢.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆