473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Web Textbox

Hi all

i need to format a simple textbox in a webform. i already
know how to align for example text (style="text-align:
right;") now i need a numeric format for the textbox as
like
"#,##0.00". does anybody know how to do that? either with
code behing or in HTML?

thank you in advance

Rene
Jul 21 '05 #1
4 2391
Try using a RegularExpressionValidator. It'll require the roundtrip, but
it's easy to do without any code.

"Rene Fehr" <re*******@netradox.com> wrote in message
news:0c****************************@phx.gbl...
Hi all

i need to format a simple textbox in a webform. i already
know how to align for example text (style="text-align:
right;") now i need a numeric format for the textbox as
like
"#,##0.00". does anybody know how to do that? either with
code behing or in HTML?

thank you in advance

Rene

Jul 21 '05 #2
Thanks for that.

all i want to do is to mask the values in the textbox, i
don't need to validate the values. i am looking for a
solution like in a Datagrid where you can use
Databinder.Eval

text='<%# DataBinder.Eval
(Container.DataItem, "DebBetrag", "{0:#,##0.00}") %>'

this is a valid syntax, but nothing happens with the
statement below.

txtBudget.Text.Format("#,##0.00", txtBudget)

what is wrong here?

Regards,

Rene
-----Original Message-----
Try using a RegularExpressionValidator. It'll require the roundtrip, butit's easy to do without any code.

"Rene Fehr" <re*******@netradox.com> wrote in message
news:0c****************************@phx.gbl...
Hi all

i need to format a simple textbox in a webform. i already know how to align for example text (style="text-align:
right;") now i need a numeric format for the textbox as
like
"#,##0.00". does anybody know how to do that? either with code behing or in HTML?

thank you in advance

Rene

.

Jul 21 '05 #3
Have you looked at passing the textbox value into a numeric data type
variable and then using the FormatNumber function on that variable?

"Rene Fehr" <re*******@netradox.com> wrote in message
news:0c****************************@phx.gbl...
Hi all

i need to format a simple textbox in a webform. i already
know how to align for example text (style="text-align:
right;") now i need a numeric format for the textbox as
like
"#,##0.00". does anybody know how to do that? either with
code behing or in HTML?

thank you in advance

Rene

Jul 21 '05 #4
this is what i need

i did it the following way and it works

txtBudget.Text = FormatNumber(txtBudget.Text, -1,
TriState.True, TriState.True, TriState.True)
thanks a lot

Rene
-----Original Message-----
Have you looked at passing the textbox value into a numeric data typevariable and then using the FormatNumber function on that variable?
"Rene Fehr" <re*******@netradox.com> wrote in message
news:0c****************************@phx.gbl...
Hi all

i need to format a simple textbox in a webform. i already know how to align for example text (style="text-align:
right;") now i need a numeric format for the textbox as
like
"#,##0.00". does anybody know how to do that? either with code behing or in HTML?

thank you in advance

Rene

.

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jonas L | last post by:
Hi, I need to create a textbox which acts as a normal textbox but with the following extra requirements: 1) In-focus color, when the textbox gets focus the backcolor property of the textbox...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
0
by: Newasps | last post by:
Hi guys, I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
11
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. ...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
8
by: Marco Pais | last post by:
Hi there. How can I change the background color of a textbox when it gets the focus? I can handle the "Enter" event and do this private void txtDummie_Enter(object sender, EventArgs e) { ...
1
by: Andy B | last post by:
I have this code: protected void EditEventsWizard_NextButtonClick(object sender, WizardNavigationEventArgs e) { //get the values from the DetailsView TextBox StartTime =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.