Global Formating of Text Fields

  • Thread starter Thread starter randy.buchholz
  • Start date Start date
R

randy.buchholz

I am looking for a way to apply a format by data type. For example, I would
like to format all dates as {0:d} without having to do each by hand. I am
using themes and looked around there but couldn't find anything. Thanks.
 
Yes, that will work for textboxes, but I want to do this for all text fields
including Grid and Detail controls. I can convert to template fields and
use a custom control, but that puts me back to having to play with each
instance.

Eliyahu Goldin said:
You can make a user control or you can inherit your own textbox from the
TextBox.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


randy.buchholz said:
I am looking for a way to apply a format by data type. For example, I
would like to format all dates as {0:d} without having to do each by hand.
I am using themes and looked around there but couldn't find anything.
Thanks.
 
You may want to look into culture-related things. Something like
http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

I don't have any personal experience with that but it looks like something
that can help you.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


randy.buchholz said:
Yes, that will work for textboxes, but I want to do this for all text
fields including Grid and Detail controls. I can convert to template
fields and use a custom control, but that puts me back to having to play
with each instance.

Eliyahu Goldin said:
You can make a user control or you can inherit your own textbox from the
TextBox.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


randy.buchholz said:
I am looking for a way to apply a format by data type. For example, I
would like to format all dates as {0:d} without having to do each by
hand. I am using themes and looked around there but couldn't find
anything. Thanks.
 
Thanks, this does looks like a a good starting place. I'll post anything I
discover.

Eliyahu Goldin said:
You may want to look into culture-related things. Something like
http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

I don't have any personal experience with that but it looks like something
that can help you.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


randy.buchholz said:
Yes, that will work for textboxes, but I want to do this for all text
fields including Grid and Detail controls. I can convert to template
fields and use a custom control, but that puts me back to having to play
with each instance.

Eliyahu Goldin said:
You can make a user control or you can inherit your own textbox from the
TextBox.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


I am looking for a way to apply a format by data type. For example, I
would like to format all dates as {0:d} without having to do each by
hand. I am using themes and looked around there but couldn't find
anything. Thanks.
 
Back
Top