textbox

How to create a function and call it on event.

Hello, I've included code for my textbox/textarea counter I put together. (hope it doesn't get mangled in my post...) The script works quite well, however I know my code is ridiculously bloated due to my inexperience with jquery and javascript. I was hoping someone could show me how to take the repetitive code (//event one thru five) ...

Disable backspace in textbox via javascript

I have a textbox which is extended by an Ajax Control Toolkit calendar. I want to make it so that the user cannot edit the textbox and will have to instead use the calendar extender for input. I have managed to block all keys except backspace! This is what I have so far: <asp:TextBox ID="TextBox1" runat="server" onKeyPress="javascrip...

Winforms AutoComplete Texbox Problem..

Hello there.. Look this http://csharpdotnetfreak.blogspot.com/2009/01/winforms-autocomplete-textbox-using-c.html i have applied this for City Field textbox that displays the CityNames on Typing as Suggestion I have taken a DataTable as DataSource which was pre-filled from Database. I loop through DataTable and Add a CityNames to the...

Is it possible to change a textbox's text which is in english to tamil in C#

Question How do I translate text a user types from English to another language? What APIs exist for this? Background When a user types in text into a TextBox on my ASP.NET page, I want it to be automatically translated into Tamil. ...

Silverlight resize textbox according to text size

Hi, I'm using Silverlight 4 and I want to create a childwindow with a TextBox, that the TextBox's width will be constant and it's height will be resized according to the size of the assigned text. Any ideas how can I do it? ...

Displaying serial port output data in text-box in efficient way in java

Hi Geeks, I am making a GUI application for operating a remote device through serial port. For this I am using two threads - "reading from" and "writing to" serial port. My main application frame contains one menubar with menuItems and submenu items and one scrollable text area. Now I am putting all the output from serial port to text a...

Detecting a control's focus in Silverlight

Is there any way to tell whether a control (specifically a System.Windows.Controls.TextBox) is focused in Silverlight? I'm looking for something like the following (what you would see in a regular .Net application): textBox.Focused This seems like something simple and trivial to leave out from a control, and yet I can't find an answer...

Identify embedded code in textbox using jQuery

I recently found out about oEmbed which is "a fomat for allowing an embedded representation of a URL" basically you enter the url of a youtube video that you like and oEmbed will return the embedded code of the video in this page. I want to give my users the option to either enter a url or embed code in a textbox. If is embed code it s...

C# : Using an embedded font on a textbox

I'm embedding a font in my app as EmbeddedResource and want to use it in a textbox. AddMemoryFont help says I have to set compatible text rendering to true to use GDI+ so my font can be used, but somehow it just won't display the right font. in Program.cs I explicitly state : Application.SetCompatibleTextRenderingDefault(true); So why ...

jqeury slideUp(); breaks my POST form

I have a form with several <input> text boxes. They work fine via a post request. Each one is enclosed in its own div, which slides up (using slideUp();) what it has been filled in. However, any text box whose div that has undergone slideUp(); (and is therefore invisible) does not pass its variable on to the next page when the form has ...

What is a good way to indicate a field is mandatory?

I would like to indicate to the user that a particular textbox or combobox is mandatory. What is a neat way to do this? Currently, I have a gradient red border around the textbox when the text is null or empty, but it seems a bit much when you show a form and a number of the fields are red. I'm looking for something that is clear, but i...

c# textbox font problem : same font looks completely different in app then in notepad

I'm trying to display ascii-art in a textbox. If I open a specific .nfo file in notepad with the font "Lucida Console", 9pt, regular, it looks like this : http://i48.tinypic.com/24zvvnr.png In my app I set the font of the textbox to "Lucida Console", 9 pt, regular, it looks like this : http://i49.tinypic.com/2ihq8h0.png What am I doi...

C# Create multiple .txt files using strings from another file and textbox

Hello to all. I am new to programming. Is there a way to create multiple .txt files using data from another file in C#. like this: 1. we have data.txt with 100 or more strings string1 string2 string3 ... 2. we have textbox1 and textbox2 waiting for user to enter strings 3 . we need to create 100 or more files using strings from data.t...

show button if cursor is between two strings in a textbox (VB.net)

Basically I have a series of lines in a textbox like this: ### = 1232, 1234, 1236, 1238, 123A, 123C ; comment here I want to show a button when the caret (cursor pipe thing) in the textbox goes is in a number so like: ... , 12|31, .... or ... , 123|1, .... etc (the pipe being the caret) I have written code to check if it is in a numbe...

How many times a string occurs in another string (textbox) VB.NET

How can I get how many times a string occurs in a textbox? I thought the find function would return the number of times found but it seems to return the location of it. ...

Not getting user input from TextBox

Hi, I'm starting to loose my nerves on some completely banal thing: I don't get user input from a TextBox :S I do something like this (code behind aspx): protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { this._presenter.OnViewInitialized(); } this._presenter...

php text box enter event

hello all, i was created one text box and autosuggestion in json used php. enter text box input "a" and autosuggestion output "a" related keywords, i was select any one keyword using keyboard "Down arrow or Up arrow" and "Enter" key pressed. the form action GET method post only "a" letter, not selected words. i want selected words post i...

Html.Textbox validation CSS not Applied

Hello all, Thank you in advance for any help. I am having an issue on 2 of my websites that I have created. I have Html.TextBox 's on the page that need to be filled out and I have validation working so that the validation message shows up when they are empty. My issue is with the CSS for the TextBox itself. For some reason the text...

MVC Html.TextBox providing incorrect value?

Hi, Given a loop like this: <% for (int valuationIndex = 0; valuationIndex < Model.CollectiveInvestment.Funds.Count; valuationIndex++) { FundValuation allocation = Model.CollectiveInvestment.Funds[valuationIndex]; int deletedIndex = valuationIndex;// (Model.IsDeleted(allocation...

Firefox XUL textbox: How to scroll to the bottom?

I'm working on a Firefox extension, and I have created a multiline text box. When the user presses a button, I add text to the textbox by using (Javascript) TextBoxElement.value += "More Text"; The problem with this code, is that whenever more text is added, the textbox scrolls all the way to the top. With much testing, I haven't figure...