Web Textbox

  • Thread starter Thread starter Rene Fehr
  • Start date Start date
R

Rene Fehr

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
 
Try using a RegularExpressionValidator. It'll require the roundtrip, but
it's easy to do without any code.
 
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
 
Have you looked at passing the textbox value into a numeric data type
variable and then using the FormatNumber function on that variable?
 
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
 
Back
Top