textbox

Validate 1 of the 2 fields with asp.net validators

Hello, I've got a simple form with some textboxes. These textboxes all have a RequiredFieldValidator. If field 1 is filled in I need to disable the RequiredFieldValidator of field 2 because only one of these fields is required. What is the best way to accomplish this? ...

How to set focus in a programmatically created textbox?

What do I need to do to the following code so that the cursor is blinking in the second textbox when the window appears? XAML: <Window x:Class="TestFocksdfj.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="30...

How can filter variations of the word 'the' using a regex in C#?

I am completely new to writing regular expressions. I am trying to write a Regex that will not allow the following terms in a text box. the The T h e ...

Win Forms text box masks

Hi everyone How can I put mask on win form text box so that it allows only numbers? And how it works for another masks data, phone zip etc. I am using Visual Studio 2008 C# Thanks. ...

How to create this one , where I can add more textbox if user wants to.

How to create this one ?, where a user can add more textbox if user wants to. Ive seen topics regarding with this stuff .... like in here http://tinyurl.com/yjbp7nf but it has problems regarding with IE... and btw can it be done with jquery? just curious Im trying to find an easy way to do this..hope someone help me..anyhelp can do...

How to prevent user from deleting text in a text box.

Ok so I am new here and was wondering if someone a little more advance then me can help me out. I have text box on my website with code for user(s) to copy the code that's in the text box and paste the code in Orkut scrapbook which will generate a imagine. I am using onclick so when user clicks on code it highlight it and then they c...

How to redirect a System.Windows.Controls.TextBox input to a stream?

I tried: private void textBox1_KeyDown(object sender, KeyEventArgs e) { streamWriter.Write(e.Key.ToString()); } But I don't know how to convert a Key to string correctly. I also tried: private void textBox1_TextInput(object sender, TextCompositionEventArgs e) { streamWriter.Write(e.Text); } But this event is not called. The...

Autocomplete textbox collection

In windows forms a textbox can be made into an autocomplete textbox by giving it a simple list of strings or by giving it a custom source that can only be a AutoCompleteCollection which is a strong typed list of strings. I would like to be able to add a key to each string..so that whenever any suggestion is selected I can grab that key....

how to pass the value of a textbox in a textbox-group?

I made something like an array of Input boxes in a html file, in this way, it is easy to write just one javascript function for all of them (see below): <form name="myform"> <input type="text" name="t" onkeydown="return a(0)"> <input type="text" name="t" onkeydown="return a(1)"> <input type="text" name="t" onkeydown="return a(2)">...

Find a window using c++ and modifying controls

I would like to use c++ without mfc(and not clr) in order to modify textbox's and activate a button on a form outside of my project. I don't know where to start. I've done a lot of searching but can only find information for VB. A starting point would help. Thanks. I tried this and it doesn't seem to work. HWND fWindow = FindWindow(NU...

Draw Line in TextBox C# (.NET 3.5)

Hi, i need a textbox with a bottom-line such like inputfields used in forms. I had looked for a functionality like single border on bottom, or something like this. But i think the only way is to draw a single line in a textbox. The following code doesn't work: private void textEdit1_Paint(object sender, System.Windows.Forms.PaintEven...

Passing Textboxes from 'form' to stored procedure is resulting in errors

I am passing form values to stored procedure parameters and it appears I may have some data type issues. The stored procedure has been tested thoroughly and is working great, so I will just include the parameters from the stored proc. I'll also include the aspx and code behind detail below. I am VERY new at this, so any help on why I a...

How to set 'RowLength' for a textbox in Silverlight?

Hi, is it possible to set number of characters per row for a multiline (AcceptsReturn="True") textbox in Silverlight? Like Cols attribute of Textarea in HTML. ...

How to bubble key events from a control up to a form?

I am aware of the KeyPreview property of a Windows Form, and this allows the Form to receive the key events before they get passed to the focused control. However, I want the Form to receive the event after it has been to the focused control. As a test I have placed a TextBox on a Form. Upon typing in the TextBox it should perform it's...

Suppress Automatic Textbox Selection on Windows Forms Form.Show()

I have an application where I am trying to mimic the "soft description" textboxes like those found for the tags and title locations on this site. The way I've done this is essentially to create my textbox, and depending on what happens when the mouse pointer enters or leaves the control, it updates the content of the textbox to get the ...

Check Validate Text in Textbox + Windows Forms

Hi All, I am new to Win Forms, I have a scenario here.. When User enter ID in a textbox, I want to check that value in database and get the name for that ID before submitting the Submit Button. In webforms it can be done using OnFoucs and OnBlur events but how can I do here before submitting the button. I am using .NET 1.1 Regards ...

populating a table from sql server through vb.net including dropdownlist and checkboxes

this is the scenario. I have 1 aspx file with a table in it. it has a .aspx.vb file behind it. i want to populate this table from the .vb code. the table shall have many lines (rows) but they should be in this format. also the checkbox data, textbox data and dropdownlist data comes from database behind. how should i go about thi...

Is there any other way to append text to a Textbox control?

I have a custom logging framework writing to a System.Windows.Forms.TextBox. The way i am writing to the TextBox now is like this: tbLog.Text += newLogEntry.Text; The problem with this approach is that each time this is executed the strings from the tbLog.Text and newLogEntry.Text are concatenated, and then assigned to tbLog.Text. As ...

Jquery in Checkbox

I have multiple html checkboxes that all have different names. What I have to do is when it is checked it should disable some radio button that has a different name. I know it can be simply done using jquery. Any help...with a simple example..thanks ...

Comma or semicolon-delimited AutoComplete TextBox

I would like to have a TextBox that supports AutoComplete and lets users type multiple words separated by a comma or semicolon, offering suggestions for each word. I have a standard TextBox with textBox.AutoCompleteCustomSource.AddRange(new[] { "apple", "banana", "carrot" }); textBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; t...