textbox

A C# Textbox that functions like a CLI

I am creating a console like application and I am wonder what the best way to prevent the user from editing previously executed commands would be. Right now I am using a KeyPressEventHandler to check where the user is trying to type and essentially ignore it if the caret is somewhere other then the "prompt" portion of the textbox. This f...

WPF Component in Windows Application

Hi all, i have created one component in WPF. its working fine with WPF but when i tried to use it in windows application i am getting one issue. i have one textbox in that control so in when the control hosted in windows applicaion and i try to type something in that textbox its not working. i tried to put some messageboxes in "KeyPrev...

Best way to restrict a text field to numbers only?

I'm using the following Javascript to restrict a text field on my website to only accept numerical input, and no other letters or characters. The problem is, it REALLY rejects all other key inputs, like ctrl-A to select the text, or even any other browser functions like ctrl-T or ctrl-W while the text box is selected. Does anyone know of...

set background color of all textboxes (input fields) to transparent

I am upgrading part of a very old website. One of the pages that I own uses controls and dlls that I do not. There is one dll that puts a textbox (input field) on the page. This field is concepually a label but the person chose to use a textbox. Anyways, I can't change the dll. Is there a way in my asp.net page that uses the dll to say ...

In C#, how do I make my button's text dynamic?

I'm a newbie when it comes to coding C#, so please don't be too harsh on me. I've coded with ActionScript before, and notice that it's very similar. Anyway, I need to basically build a simple application where 2 characters give each other "money"... or ints. The character name should be dynamic, and the buttons should play off of what t...

Reset dropdown lists using javascript

Hello all. I have the following scenario - a few dropdwon lists and a textbox. I'd like to 'reset' these drop downs to their original value when a user clicks on the textbox: Javascript: function ResetDropDowns() { var ddlSuppliers = document.getElementById('<%=ddlSuppliers.ClientID%>'); var ddlResponse = document.getElemen...

C++ textbox contents

How do I get the contents of a textbox in C++? ...

Clientside validation of a textbox

I have an asp.net control textbox, clicking on which a jquery timepicker appears and user can select any time.But I want to validate the selected time so that it is one hour greater than the current time in the client side. I mean when textbox value will be changed it should be validated. Can anyone help me how to do this? ...

Writing <period> in my TextBox should perform tab

When I write a <period> into myTextBox I want a myOtherText.Focus to be performed. Anyone know a way of doing this in xaml code? Edit:Agree that the orginale solution I asked for was a little hacky. So I changed the question. :) ...

MSAccess - populate text box with value from query

I have a combo box and several text boxes on a form. When I select a value from the combo box I want it to run a query based on that value and populate the text boxes with the data returned by the query. The query should only return one record and the textboxes correnspond to different columns in that record. I have this code: Private ...

MVC 2, Format Model display into a textbox

I have an easy one for you guys. In my view I have a textbox, like so: <%= Html.TextBoxFor(x => x.Price, new { @class = "text tiny" })%> Price is a decimal. When the form loads up. the textbox displays "0". I would like it to display "0.00". I tried <%= Html.TextBoxFor(x => String.Format("{0:0.00}", x.Price), new { @class = "text ...

How can we get number of textboxes in a form using javascript?

How can we get number of textboxes in a form using javascript? Thanks in advance. ...

Preserve Line Breaks in Asp.net Textbox

I have a multiline textbox whose .Text property get saved in an SQL 2008 DB. When I submit the textbox, I loose the returns. How do I handle this? I've used Enviroment.Newline() to do some html conversion stuff, but I've never ran into this specific problem. Edit: Nevermind, it was working just fine, but I was replacing "\n" incorrec...

How to make a WPF TextBox use password characters?

hi, i need to set it it dynamicaliy.. Can i make password Box to as normal text- i mean- user could see the text what he entered.??? its for-> i need to use same control for " password sesion" and also the "item count entering" session ..?? ...

Text Input and Image Firefox Alignment Issue

Hey, I am pulling me hair out about this one. http://www.nettunes.co.za/build/contact.php I have an image at the end of a text input that is styled with a background image, here is the css: .text_input{ background:url(../images/forms/text_input_back.png) top left no-repeat; width:479px; border-style:none; font-size:18px...

Can you you show a grey hint in an HTML text box with CSS alone?

You see these text input boxes from time to time on the web: a grey label is shown inside the box, but once you type there, the grey text disappears. This page even has one: the "Title" field behaves exactly like that. So, questions: Is there a standard term for this? I'm really struggling to find anything on google Can it be done wit...

UpperCase display in a Textbox

Hi Guys I need to DISPLAY the text in an asp textbox as upper case, regardless of whether the users caps lock is on or not – is there some property or method I can use? I am converting the text using the .ToUpper method on submitting to the database anyway, but I have been asked to also DISPLAY it in upper case before that when first be...

Order of execution in a WPF Textbox

I'm running into an issue with a formatting converter and data validation. I have the following textbox XAML declaration <TextBox FontFamily="Segoe" FontSize="16" FontWeight="Medium" TabIndex="{Binding TabBinding}" Foreground="Black" Opacity="0.9" IsTabStop="True" Uid="{Binding PriceID}" Text="{Binding NewPrice,Converter={S...

Keypad decimal separator on a Wpf TextBox, how to?

I have a Wpf application with some textbox for decimal input. I would that when I press "dot" key (.) on numeric keypad of pc keyboard it send the correct decimal separator. For example, on Italian language the decimal separator is "comma" (,)...Is possible set the "dot" key to send the "comma" character when pressed? ...

How to change focus from a textbox to another textbox with code in WPF - C#

I have Five textboxes as part of a grid. <TextBox Name="A1" MaxLength="1" ></TextBox> <TextBox Name="A2" MaxLength="1" ></TextBox> <TextBox Name="A3" MaxLength="1" ></TextBox> <TextBox Name="A4" MaxLength="1" ></TextBox> <TextBox Name="A5" MaxLength="1" ></TextBox> Initially cursor will be focused at A1 using the command A1.Focus(). A...