|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to recover a value in a textbox Hello, I am setting up a software with Visual Studio. I have a TextBox where the user will enter a value in decimal. Should I get this value and that I pass in hex. I know that 64hexa = 100decimal but the problem is that I do not know everything in C #. How do I write the code? Could you help me please? Thank you in advance. |
#2
| |||
| |||
Re: How to recover a value in a textbox hi, To retrieve the value of a textbox, you should do: Code: int = int valeurEntier. Parse (taTextBox. Text); Code: string hex = String.Format ( "(0: X)", valeurEntier); |
#3
| |||
| |||
Re: How to recover a value in a textbox I am Not finding anything interesting in using the String.Format method in this case. Thereby making Code: string hex = valeurEntier. ToString ( "x"); |
#4
| |||
| |||
Re: How to recover a value in a textbox I have little doubt in my mind, What will the X refers to, i have little confusion about it, what should i consider about it. |
#5
| |||
| |||
Re: How to recover a value in a textbox You are using data binding. If you set TwoWay binding for the TextBox, the value user entered in the box should be automatically update the DataObject that bind to that row. <TextBox Text="{Binding Nome, Mode=Two Way}" BorderBrush="Transparent" BorderThickness="0"/> If you check the Nome field on you DataObject in the ProgrammazioneDS, you should be able to see the change. You do not need to access the UI element to retrieve that data. |
![]() |
|
Tags: ide, text box, visual basic, visual studio |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel/VBA: Copying text from UserForm Textbox to a Worksheet Textbox | Neil Ives | Software Development | 2 | 20-08-2010 01:23 AM |
Textbox validation in ASP.NET | Kasper | Software Development | 4 | 19-01-2010 08:28 PM |
Moving from one TextBox to another with TAB | GeforceUser | Software Development | 3 | 05-11-2009 06:31 PM |
Numerical value on TextBox | KABIRA16 | Software Development | 3 | 29-10-2009 04:25 PM |
how to hide a textbox in asp.net | Alejandro | Software Development | 2 | 10-06-2009 10:43 AM |