Global Formating of Text Fields

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.
 
R

randy.buchholz

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.
 
E

Eliyahu Goldin

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.
 
R

randy.buchholz

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top