使用bootstrap管理LTE主题的问题 [英] problem getting with bootstrap Admin LTE theme

查看:99
本文介绍了使用bootstrap管理LTE主题的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI伙计们,



我在asp.net项目中使用bootstrap主题n母版页。



ni也没有任何UpdatePanel。



只是,我在asp.net页面中的转发器中有一些其他控件的复选框。



但在后面的代码中,



复选框选中的值变为false,而不是true。



HI guys,

I'm using bootstrap theme n master page in asp.net project.

n i dont have any UpdatePanel also.

Just, i have checkbox n some other controls in a repeater, in asp.net page.

But in the code behind,

the checkbox checked value getting false, instead of true.

<asp:Repeater ID="Repeater1" runat="server" EnableTheming="True">
            <HeaderTemplate>
                <table class="table table-bordered table-hover">
                    <thead class="bg-light-blue">
                        <tr>
                            <th>
                                S.No.
                            </th>
                            <th>
                                Select
                            </th>
                            <th>
                                Main Chemicals
                            </th>
                            <th>
                                15%
                            </th>
                            <th>
                                20%
                            </th>
                            <th>
                                No.of Rows
                            </th>
                            <th>
                                Volume
                            </th>
                        </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td valign="middle" align="center" style="width: 50px" class="bg-gray">
                        <b style="color: Black">
                            <%# Container.ItemIndex + 1 %>
                        </b>
                    </td>
                    <td align="center" style="width: 50px">
                        <asp:CheckBox ID="chkSelect" runat="server" />
                    </td>
                    <td>
                        <asp:Label ID="lblchm" CssClass="textBlack" Font-Bold="true" runat="server" Text='<%# Eval("CName") %>'></asp:Label>
                        <asp:HiddenField ID="hdnChemical" runat="server" Value='<%# Eval("RecID") %>' />
                    </td>
                    <td align="center" style="width: 50px">
                        <asp:RadioButton ID="rb15" GroupName="percentage" runat="server" />
                    </td>
                    <td align="center" style="width: 50px">
                        <asp:RadioButton ID="rb20" GroupName="percentage" runat="server" />
                    </td>
                    <td>
                        <asp:TextBox ID="txtrows" runat="server" CssClass="form-control" AutoPostBack="False"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtrows"

                            SetFocusOnError="true" ForeColor="Red" ErrorMessage="Please Enter Only Numeric"

                            Style="z-index: 101; left: 424px; position: absolute; top: 285px" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                    </td>
                    <td>
                        <asp:TextBox ID="txtvolume" runat="server" CssClass="form-control" AutoPostBack="False"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtvolume"

                            SetFocusOnError="true" ForeColor="Red" ErrorMessage="Please Enter Only Numeric"

                            Style="z-index: 101; left: 424px; position: absolute; top: 285px" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody> </table>
            </FooterTemplate>
        </asp:Repeater>
<br />

<table width="100%">
    <tr>
        <td align="center">
            <asp:Button ID="btncncl" runat="server" Text="Cancel" CssClass="btn btn-sm btn-danger"

                Font-Bold="True" OnClick="btncncl_Click" />&nbsp
            <asp:Button ID="btnok" runat="server" Text="Next >>" CssClass="btn btn-sm btn-primary"

                Font-Bold="True" OnClick="btnnext_Click" />
        </td>
    </tr>
</table>







pageload:






pageload:

if (!IsPostBack)
            {
                

                    int recid = Convert.ToInt32(Request.QueryString["RECID"]);
                    getProjectDetails(recid);
                    Fill_Repeater();

                }





插入代码:



Insertion Code:

protected void btnnext_Click(object sender, EventArgs e)
       {
           int i = 0;
           int PrjID = Convert.ToInt32(Request.QueryString["RECID"]);
           foreach (RepeaterItem item in Repeater1.Items)
           {
               //TextBox t = (TextBox)item.FindControl("txtrows");
               CheckBox chk = (CheckBox)item.FindControl("chkSelect");

                   if (chk.Checked)//getting false
                   {
                       RadioButton rb1 = (RadioButton)item.FindControl("rb15");
                       RadioButton rb2 = (RadioButton)item.FindControl("rb20");

                       bool fifteen = rb1.Checked;
                       bool twenty = rb2.Checked;

                       HiddenField hdn = (HiddenField)item.FindControl("hdnChemical");
                       int ChemicalID = Convert.ToInt32(hdn.Value);

                       TextBox rows = (TextBox)item.FindControl("txtrows");
                       string sRows = rows.Text;
                       TextBox vol = (TextBox)item.FindControl("txtvolume");
                       string svol = vol.Text;

                       //Insert query here!
                       string data = PrjID + "," + fifteen + "," + twenty + "," + sRows + "," + svol + "," + Session["UserRecID"].ToString() + "," + ChemicalID.ToString();
                       i = bl.InsertAssignChemicals(data);

                   }

           }

           if (i > 0)
           {
               bl.UpdateProjectStatus(PrjID, 2);
               Response.Redirect("ProjectList.aspx");
           }

       }





can anyone... plzzz help me.



thnx



can anyone... plzzz help me.

thnx

推荐答案

\"></asp:RegularExpressionValidator>
</td>
<td>
<asp:TextBox ID=\"txtvolume\" runat=\"server\" CssClass=\"form-control\" AutoPostBack=\"False\"></asp:TextBox>
<asp:RegularExpressionValidator ID=\"RegularExpressionValidator2\" runat =\"server\" ControlToValidate=\"txtvolume\"

SetFocusOnError=\"true\" ForeColor=\"Red\" ErrorMessage=\"Please Enter Only Numeric\"

Style=\" z-index: 101; left: 424px;位置:绝对; top: 285px\" ValidationExpression=\"^\d+
"></asp:RegularExpressionValidator> </td> <td> <asp:TextBox ID="txtvolume" runat="server" CssClass="form-control" AutoPostBack="False"></asp:TextBox> <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtvolume" SetFocusOnError="true" ForeColor="Red" ErrorMessage="Please Enter Only Numeric" Style="z-index: 101; left: 424px; position: absolute; top: 285px" ValidationExpression="^\d+


\"></asp:RegularExpressionValidator>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</tbody> </table>
</FooterTemplate>
</asp:Repeater>
<br />

<table width=\"100%\">
<tr>
<td align=\"center\">
<asp:Button ID=\"btncncl\" runat=\"server\" Text=\"Can cel\" CssClass=\"btn btn-sm btn-danger\"

Font-Bold=\"True\" OnClick=\"btncncl_Click\" />&nbsp
<asp:Button ID=\"btnok\" runat=\"server\" Text=\"Next >>\" CssClass=\"btn btn-sm btn-prima ry\"

Font-Bold=\"True\" OnClick=\"btnnext_Click\" />
</td>
</tr>
</table>
"></asp:RegularExpressionValidator> </td> </tr> </ItemTemplate> <FooterTemplate> </tbody> </table> </FooterTemplate> </asp:Repeater> <br /> <table width="100%"> <tr> <td align="center"> <asp:Button ID="btncncl" runat="server" Text="Cancel" CssClass="btn btn-sm btn-danger" Font-Bold="True" OnClick="btncncl_Click" />&nbsp <asp:Button ID="btnok" runat="server" Text="Next >>" CssClass="btn btn-sm btn-primary" Font-Bold="True" OnClick="btnnext_Click" /> </td> </tr> </table>







pageload:






pageload:

if (!IsPostBack)
            {
                

                    int recid = Convert.ToInt32(Request.QueryString["RECID"]);
                    getProjectDetails(recid);
                    Fill_Repeater();

                }





Insertion Code:



Insertion Code:

protected void btnnext_Click(object sender, EventArgs e)
       {
           int i = 0;
           int PrjID = Convert.ToInt32(Request.QueryString["RECID"]);
           foreach (RepeaterItem item in Repeater1.Items)
           {
               //TextBox t = (TextBox)item.FindControl("txtrows");
               CheckBox chk = (CheckBox)item.FindControl("chkSelect");

                   if (chk.Checked)//getting false
                   {
                       RadioButton rb1 = (RadioButton)item.FindControl("rb15");
                       RadioButton rb2 = (RadioButton)item.FindControl("rb20");

                       bool fifteen = rb1.Checked;
                       bool twenty = rb2.Checked;

                       HiddenField hdn = (HiddenField)item.FindControl("hdnChemical");
                       int ChemicalID = Convert.ToInt32(hdn.Value);

                       TextBox rows = (TextBox)item.FindControl("txtrows");
                       string sRows = rows.Text;
                       TextBox vol = (TextBox)item.FindControl("txtvolume");
                       string svol = vol.Text;

                       //Insert query here!
                       string data = PrjID + "," + fifteen + "," + twenty + "," + sRows + "," + svol + "," + Session["UserRecID"].ToString() + "," + ChemicalID.ToString();
                       i = bl.InsertAssignChemicals(data);

                   }

           }

           if (i > 0)
           {
               bl.UpdateProjectStatus(PrjID, 2);
               Response.Redirect("ProjectList.aspx");
           }

       }





can anyone... plzzz help me.



thnx



can anyone... plzzz help me.

thnx


这篇关于使用bootstrap管理LTE主题的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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