Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Jquery移动按钮未显示文本值?_C#_Asp.net_Jquery Mobile - Fatal编程技术网

C# Jquery移动按钮未显示文本值?

C# Jquery移动按钮未显示文本值?,c#,asp.net,jquery-mobile,C#,Asp.net,Jquery Mobile,我在我的项目中使用Asp.net和移动jquery。我想在点击上下按钮时更改按钮文本。它在Chrome浏览器系统中运行良好。但我的手机浏览器——opera mobile,它不显示文本。按钮是空白的,即使上下也不显示。什么是错误 我希望你能理解我的问题。我在下面给出我的代码以供参考 ASPX- C 在js文件中查找按钮样式代码。我想,。。按钮上有文本,但可能是摆动或折叠的。在各种浏览器中尝试并平铺手机,看看它是否看起来像文本?在js文件中查找按钮样式代码。我想,。。按钮上有文本,但可能是摆动或折叠

我在我的项目中使用Asp.net和移动jquery。我想在点击上下按钮时更改按钮文本。它在Chrome浏览器系统中运行良好。但我的手机浏览器——opera mobile,它不显示文本。按钮是空白的,即使上下也不显示。什么是错误

我希望你能理解我的问题。我在下面给出我的代码以供参考

ASPX-

C


在js文件中查找按钮样式代码。我想,。。按钮上有文本,但可能是摆动或折叠的。在各种浏览器中尝试并平铺手机,看看它是否看起来像文本?

在js文件中查找按钮样式代码。我想,。。按钮上有文本,但可能是摆动或折叠的。在各种浏览器中尝试,并将手机平铺,看看它是否看起来像文本

<div id="body" class="ui-content ui-body-a" > 
        <div class="ui-grid-b">                
            <div class="ui-block-a"><asp:Button ID="Button1" runat="server" Text="Button" /></div>
            <div class="ui-block-b"> <asp:Button ID="Button2" runat="server" Text="Button" /></div>             
            <div class="ui-block-c"> <asp:Button ID="btnUp" runat="server" Text="UP" onclick="btnUp_Click" /></div>    
            <div class="ui-block-a"><asp:Button ID="Button3" runat="server" Text="Button" /></div>
            <div class="ui-block-b"><asp:Button ID="Button4" runat="server" Text="Button" /></div>
            <div class="ui-block-c"> <asp:Button ID="Button5" runat="server" Text="Button" /></div>
            <div class="ui-block-a"><asp:Button ID="Button6" runat="server" Text="Button" /></div>
            <div class="ui-block-b"><asp:Button ID="Button7" runat="server" Text="Button" /></div>
            <div class="ui-block-c"> <asp:Button ID="Button8" runat="server" Text="Button" /></div>
            <div class="ui-block-a"><asp:Button ID="Button9" runat="server" Text="Button" /></div>
            <div class="ui-block-b"><asp:Button ID="Button10" runat="server" Text="Button" /></div>                       
            <div class="ui-block-c"><asp:Button ID="btnDown" runat="server" Text="DOWN" onclick="btnDown_Click" /></div>               
        </div><!-- /grid-b -->
  public int btn_click, tot;
        string[] roomno = new string[100];
        int i = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            //MySqlConnection connection = new MySqlConnection(GlobalClass.GlobalConnString.ToString());
            //string query = "SELECT Table_Entry_TableNo FROM fb_table_entry where Table_entry_OutletId ='"+ GlobalClass.GlobaloutletId +"' and Table_Entry_DeleteStatus = '0' order by CAST(Table_Entry_TableNo AS UNSIGNED),  Table_Entry_TableNo";
            //MySqlCommand command = new MySqlCommand(query, connection);
            //connection.Open();
            //MySqlDataReader Reader = command.ExecuteReader();
            //while (Reader.Read())
            //{

            //}
            //connection.Close();
            if (!Page.IsPostBack)
            {
                ViewState["btn"] = "1";
                ViewState["tot"] = "0";               
                btn_click = Convert.ToInt32(ViewState["btn"].ToString());

                int vallen = 45;
                int len = vallen;
                while (len > 10)
                {
                    len = len - 10;
                    tot++;
                }

                if (len != 0) tot++;

                ViewState["tot"] = tot;

                for (int j = 0; j <= vallen; j++)
                {
                    roomno[j] = "A" + Convert.ToString(j + 1);
                }

                ViewState["roomno"] = roomno;
                //i = 20;
                fun();
            }

        }

        private void fun()
        {
            btn_click = Convert.ToInt32(ViewState["btn"].ToString());

            i = 10 * (btn_click);

            roomno = ViewState["roomno"] as string[];
            Button1.Text = roomno[i - 10];
            Button2.Text = roomno[i - 9];
            Button3.Text = roomno[i - 8];
            Button4.Text = roomno[i - 7];
            Button5.Text = roomno[i - 6];
            Button6.Text = roomno[i - 5];
            Button7.Text = roomno[i - 4];
            Button8.Text = roomno[i - 3];
            Button9.Text = roomno[i - 2];
            Button10.Text = roomno[i - 1];         
            //enabledFn();
        }

        private void enabledFn()
        {
            //var buttons = this.tableLayoutPanel1.Controls.OfType<Button>();
            //foreach (var button in buttons)
            //{
            //    if (button.Text != "")
            //    {
            //        button.Enabled = true;
            //    }
            //    else
            //    {
            //        button.Enabled = false;
            //    }
            //}
        }

        protected void btnUp_Click(object sender, EventArgs e)
        {
            tot = Convert.ToInt32(ViewState["tot"].ToString());
            btn_click = Convert.ToInt32(ViewState["btn"].ToString());
            if (btn_click != 1) { btn_click--; ViewState["btn"] = btn_click; fun(); }            
            Button1.Text = Convert.ToString(btn_click);            
        }

        protected void btnDown_Click(object sender, EventArgs e)
        {
            tot = Convert.ToInt32(ViewState["tot"].ToString());
            btn_click = Convert.ToInt32(ViewState["btn"].ToString());
            if (btn_click < tot) { btn_click++; ViewState["btn"] = btn_click; fun(); }           
            Button1.Text = Convert.ToString(btn_click);            
        }
    }