[英]Is it possible to use a Maskeditextender for IP Adress?
I'm using AjaxControlToolKit
for an application and I'm using the MaskEditExtender
on a TextBox. 我正在为应用程序使用
AjaxControlToolKit
,并且在TextBox上使用MaskEditExtender
。 This TextBox will be use to get something like an IP address (IE: 999.999.999.999 OR 999.999.999.*). 此文本框将用于获取IP地址(例如:999.999.999.999或999.999.999。*)。
I've no difficulty to make the first one (999.999.999.999) but how can it also allow the *
instead of the 999
? 我毫不费力地制作了第一个(999.999.999.999),但它又如何允许
*
而不是999
? Is it possible? 可能吗?
Thanks to help me! 谢谢帮我!
Sorry this doesn't help, but thought I should point out that the maximum value for any octet in an IPv4 address is 255. 抱歉,这无济于事,但我想指出一点,IPv4地址中任何八位位组的最大值为255。
Its also somewhat incorrect to use * as a wildcard. 将*用作通配符也有些不正确。 You would probably be better asking for a network mask (which is another dot quaded field).
您最好要求提供网络掩码(这是另一个点四边形字段)。 Its incorrect to assume that there are 255 hosts within a class C subnet for example.
例如,假设C类子网中有255个主机是不正确的。
There is a good article on subnetting and network masks on Wikipedia/Subnetwork Wikipedia / Subnetwork上有一篇有关子网划分和网络掩码的好文章
Perfect i found it! 完美,我找到了! Here's my Maskeditextender.
这是我的Maskeditextender。
<cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" ClearMaskOnLostFocus="False" ClearTextOnInvalid="True" Filtered="N'*'" Mask="999.999.999.NNN" TargetControlID="MyTextBox" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.