blah blah blah is here! blah blah » Close

up1down
link

Hello,

I have a textBox1.text that I would like to have it insert a . every three characters.

For an IP Address, like 192.168.001.016

private void tbIPVM_TextChanged(object sender, EventArgs e)
{
if (tbIPVM.Text.Length > 12)
{
button6.Enabled = true;
}

last answered 2 years ago

1 answers

up1down
link

if this is for the web you can use the ajax toolkit and use the textbox formatter to achieve this.

if you're using windows you can use an ip address control I wrote: http://sanity-free.org/127/an_ipaddress_control_the_win32_sysipaddress32_control_in_csharp.html or you can use a masked text box.

Feedback