如何设置文本的一部分不可编辑,其余部分可在文本框aspx中编辑? [英] How do I set a part of text non editable and the rest editable in a textbox aspx?

查看:72
本文介绍了如何设置文本的一部分不可编辑,其余部分可在文本框aspx中编辑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个webform,我需要从表中选择一行,例如ip 10.0.0。*。 *将是文本框tb_ip中可编辑的部分,即10.0.0。将是灰色和ip的最后一位数字可编辑和黑色..



这是我的代码:

I'm doing a webform, where i need to select a row from a table eg an ip 10.0.0.*. That * would be the editable part in the textbox "tb_ip" which the "10.0.0." would be in gray and the last digit of the ip editable and black..

This is my code:

<div class="diver">
                <asp:Label ID="Label2" runat="server" Text="Seleccione grupo IP"></asp:Label></div>
            <div class="diver">
                <asp:DropDownList ID="DropDownList3" runat="server">
                </asp:DropDownList>
            </div>
            <div class="diver">
                <asp:Label ID="Label4" runat="server" Text="Asigne una IP"></asp:Label> </div>
            <div class="diver">
                <asp:TextBox ID="tb_ip" runat="server"></asp:TextBox></div>





谢谢!



Thank you !

推荐答案

你不能。您可以选择创建两个单独的文本框,只读它们。另外,只要想一想:如果您想要的是什么,那么对您的客户来说可能会有多么令人困惑和烦恼。你需要考虑更好的UI设计,而不是不自然的技巧。

-SA
You cannot. You may choose to create two separate text boxes, on of them read-only. Also, just think about it: if what you wanted was possible, how confusing and irritating it could be for your customers. You need to think about better UI design, not unnatural tricks.
—SA


这篇关于如何设置文本的一部分不可编辑,其余部分可在文本框aspx中编辑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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