面板控制中的TextBox和按钮在设计中没有变形。? [英] TextBox and button in panel control are not vissble in design .. ?

查看:44
本文介绍了面板控制中的TextBox和按钮在设计中没有变形。?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i在asp.net中采用了一个面板控件,其中有一个文本框控件和一个按钮控件,当我打开设计时,文本框和按钮不可见,当我运行时我可以在浏览器的控件中看到

< asp:Panel ID =   Panel1 runat =   server >  
< td align = center colspan = 4 >
< asp:标签ID = Label20 runat = server Style = font-weight:700 Text = 按电话号码搜索: > < / asp:标签 > < asp:TextBox ID = txtphno CssClass = ip runat = server占位符= 电话号码 > < / asp:TextBox >
< asp:RequiredFieldValidator ID = RequiredFieldValidator2 runat = server ForeColor = Red ControlToValidate = txtphno字体大小= Large ErrorMessage = * > < / asp:RequiredFieldValidator >
< asp:RegularExpressionValidator ID = RegularExpressionValidator1 ControlToValidate = txtphno ForeColor = 红色 runat = server ErrorMessage = 仅数字 ValidationExpression = \d + > < / asp:RegularExpressionValidator >
< asp:Button ID = btnSearchphno runat = server CssClass = inputbtn OnClick = btnSearchphno_Click Style = font-weight:700;高度:26px;
Text = search />
< / td >
< / asp:Panel > ;



这是我写的源代码,请帮帮我。

谢谢

teja

解决方案

使用此。我想由于表结构不能正常显示。将Panel控件放入单元格中



 <   td     align   = 中心    colspan   =  4 >  
< asp:Panel ID = Panel1 runat = server >
< asp:Label ID = Label20 runat = 服务器 样式 = font-weight:700 文字 = 搜索按电话号码: > < ; / asp:标签 > < ; asp:TextBox ID = txtphno CssClass = ip runat = server 占位符 = 电话号码 > ; < / asp:TextBox > ;
< asp:RequiredFieldValidator ID = RequiredFieldValidator2 runat = server ForeColor = 红色 ControlToValidate = txtphno 字体大小 = ErrorMessage = * > < / asp:RequiredFieldValidator >
< asp:RegularExpressionValidator ID = RegularExpressionValidator1 ControlToValidate = txtphno ForeColor = 红色 runat = 服务器 ErrorMessage = 仅数字 ValidationExpression = \d + > < / asp:RegularExpressionValidator >
< asp:按钮 ID = btnSearchphno runat = server CssClass = inputbtn OnClick = btnSearchphno_Click 样式 = font-weight:700;高度:26px;

< span class =code-attribute>
文字 = 搜索 / >
< / asp:Panel >
< / td >


Hi,
i have taken one panel control in asp.net in that having one text box control and one button control ,when i open design the text box and button are not visible,when i run this i can see in the controls in browser

<asp:Panel ID="Panel1" runat="server">
                        <td align="center" colspan="4">
                            <asp:Label ID="Label20" runat="server" Style="font-weight: 700" Text="search by phone number  : " ></asp:Label><asp:TextBox ID="txtphno" CssClass="ip" runat="server"  placeholder="Phone Number"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ForeColor="Red" ControlToValidate="txtphno" Font-Size="Large" ErrorMessage="*"></asp:RequiredFieldValidator>
                           <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtphno" ForeColor="Red" runat="server" ErrorMessage="Only Numbers" ValidationExpression="\d+"></asp:RegularExpressionValidator>
                           <asp:Button ID="btnSearchphno" runat="server" CssClass="inputbtn" OnClick="btnSearchphno_Click" Style="font-weight: 700; height: 26px;"
                                Text="search" />
                        </td>
                    </asp:Panel>


this is the source code what i have written please help me . .
thanks
teja

解决方案

Use this. I guess due to the table structure it is not showing properly. put your Panel control inside the cell

<td align="center" colspan="4">                        
    <asp:Panel ID="Panel1" runat="server">
        <asp:Label ID="Label20" runat="server" Style="font-weight: 700" Text="search by phone number  : " ></asp:Label><asp:TextBox ID="txtphno" CssClass="ip" runat="server"  placeholder="Phone Number"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ForeColor="Red" ControlToValidate="txtphno" Font-Size="Large" ErrorMessage="*"></asp:RequiredFieldValidator>
                           <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtphno" ForeColor="Red" runat="server" ErrorMessage="Only Numbers" ValidationExpression="\d+"></asp:RegularExpressionValidator>
                           <asp:Button ID="btnSearchphno" runat="server" CssClass="inputbtn" OnClick="btnSearchphno_Click" Style="font-weight: 700; height: 26px;"

                                Text="search" />
    </asp:Panel>
</td>


这篇关于面板控制中的TextBox和按钮在设计中没有变形。?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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