textbox

override : textBox1.Text.ToString()

How to override? ToString() textBox1.Text.**ToString()** ...

Dynamically populate a listbox from a textbox in ASP.NET MVC 2

Here's what i'm trying to do: 1 textbox with an Add button, and a ListBox underneath with a Delete button, along with a bunch of other fields. You can probably guess the functionality: type something in the text box and click Add, it will add that string into the listbox below. Select an item in the listbox and hit Delete, the item is ...

Show exact same selection range in two text fields

I have two text fields on top of one another. The one on top the user types into. The one behind it auto-completes out words with a light gray font. It works great, until you're up against the edge of the text field on top. How can I scroll the bottom text field along with the top to keep their text perfectly overlaid? Thanks in ad...

How to Pass Textbox Value to Method or Function

Hi, I have a class CURPRFC that contains the following: static public string CalcRFC(string firstname, string lastname, string middlename, string date) I'm calling this method/function in my codebehind as follows: CURPRFC.CalcRFC(txtfirstname.text, txtlastname.text, txtmidlename.text, txtdate.text) where each of the values are ...

C# & WPF : How to update an in-code declared textbox height on textbox content change?

Hello everyone, I'm fairly new to C#, I'm on a C# & Wpf course. Here my teacher has told us to inherit from UserControls and create a wpf control library of our own. In order for us to create a simple UML Editor, and right now I'm working on a Class Control. The visual representation of a class as seen here: http://www.softwarefactorie...

data not transfering from Textbox to query

Hi there... I am creating a desktop application in C# where my code is : private void btnLogin_Click(object sender, EventArgs e) { if (clsFunctions.recordExist("SELECT AtNumConstructorID, TxtConstructorName AS Fullname FROM tblConstructorDetails WHERE txtUserName = '" + txtUserName.Text + "' AND TxtPassword LIKE '" ...

Changing the forecolor and backcolor of text in a textbox

I'm making a C++ code editor application using VB.NET. I'd like to change the color of the keywords as the user types it. Also I'm looking for a way to highlight some lines of the code. Is there a way to change the forecolor and backcolour of a piece of text inside a textbox? ...

javascript textbox: enter text and it appears instantly in another textbox

Javascripters, a 'puzzle': Using a simple HTML form, make two textboxes. Whatever text you type (say, some random string of characters like asdfasdf ) into textbox #1 is IMMEDIATELY displayed, on the fly, without pressing any button or changing focus, into textbox #2. Can it be done using getElementByID? ...

[Silverlight] Defining Textbox-behaviour in XAML without Codebehind

Hello everyone, what I want to achieve is a pretty common thing, but I want to use the Silverlight advantage to keep the UI-Behaviour in XAML. I want a Textbox which has an 'empty' state like this: [ Name ] (Name in gray font), and when the Textbox receives Focus, the Fontcolor is supposed to change to black and the Textbox is suppose...

Values not passed from Textbox to code

my code : region check what Login button do private void btnLogin_Click(object sender, EventArgs e) { if (this.txtUserName.Text == "" || this.txtPassword.Text == "") { MessageBox.Show("Credentials are missing...", clsVariables._strProjectName, MessageBoxButtons.OK, MessageBoxIcon.Error); } ...

asp.net c# asp:TextBox, How to remove the cols and rows attributes?

i have a asp:TextBox control on the page. i'm setting it to a TextMode="MultiLine", I am not setting a number of rows or columns. I am setting a width and height in CSS for the control. asp.net is still adding, what i assume is a default, rows and cols attributes on the rendered control. cols="20" and rows="2" this isnt an issue in any ...

C#/WPF: How to find the closest line breaks from the selection of a TextBox

I have a TextBox txtEditor. I want to find the nearest line breaks and select it Example 1: With "no selection" suppose the selection/cursor is * this is the 1st line of text this is *the 2nd line of text this is the 3rd line of text I want to extend the selection such that the selection is now this is the 1st line of text *this i...

Textbox control dont lose value on postback if viewstate is disabled

When we disabled the viewstate in gridview its lose value but this case not true with Textbox control why? ...

GridView with paging enabled is not filtering based on input from other Controls (DropDownList, TextBox)

Hi guys, Can someone please assist me. I have dynamically created controls onto my page which consists of a GridView, DropDownList, TextBox and Button. I have successfully retrieved data onto the GridView control which then has a paging attribute enabled. Now I am trying to filter data according to the input set by the user through th...

embed/align textbox on image

I have an image of a website i need to create which is not simple. But here is a jist of it. Consider I have a username with a textbox and password with another textbox and a login button. I want to place this image as the background and use embed a textbox on top of the image at the location of the original textbox. is this possible? i ...

How can I modify a UIElement's contents?

Hello. Is there a way to modify a UIElement's contents? I have something like this: System.IO.FileStream rdr = System.IO.File.OpenRead(xamlFilePath); System.Windows.UIElement uie = (System.Windows.UIElement)System.Windows.Markup.XamlReader.Load(rdr); And when I run the debugger and add uie to the "Watch" window, it gives me the foll...

Text box in matplotlib?

Is it possible to display text in a box through Matplotlib, with automatic line breaks? By using pyplot.text(), I was only able to print multi-line text that flows beyond the boundaries of the window, which is annoying. The size of the lines is not known in advance… Any idea would be much appreciated! ...

_Setting_ textbox's text using FindControl

Hi all, I need to be able to set a textbox's (which is inside a gridview row) text to a certain string in runtime. I have used FindControl before, but can't figure out the syntax for actually setting the value of the textbox rather than just getting. Here's what I have, which doesn't compile: ((TextBox)e.Row.FindControl("txtPath")).Text...

Carriage Return (ASCII chr 13) is missing from textbox postback values when used within an ASP.NET Update panel

I have an ASP.NET TextBox with TextMode = TextBoxMode.MultiLine that is used within an AJAX Update Panel. The .Text value has been pre-set to a value that has multiple lines. When using Chrome(7.0.517.41) or Firefox(3.6.11) working with the controls posted back value on the server the carriage return is lost if the user hasn't edited th...

C# Text Box File Import

Hi all, I've got a form with multiple text boxes which are file paths for the program to import data from. Currently they are checked for non-zero length by the following: //this code imports the files required by the user, as specified in the //file path text boxes private void btImport_Click(object sender, EventArgs e) ...