Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Global Formating of Text Fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
randy.buchholz - 03 Mar 2008 14:32 GMT
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.
Eliyahu Goldin - 03 Mar 2008 15:18 GMT
You can make a user control or you can inherit your own textbox from the
TextBox.

Signature

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.
randy.buchholz - 03 Mar 2008 15:28 GMT
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.

> You can make a user control or you can inherit your own textbox from the
> TextBox.
[quoted text clipped - 3 lines]
>>I am using themes and looked around there but couldn't find anything.
>>Thanks.
Eliyahu Goldin - 03 Mar 2008 15:39 GMT
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.

Signature

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

> 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
[quoted text clipped - 8 lines]
>>>hand. I am using themes and looked around there but couldn't find
>>>anything. Thanks.
randy.buchholz - 03 Mar 2008 15:45 GMT
Thanks, this does looks like a a good starting place.  I'll post anything I
discover.

> You may want to look into culture-related things. Something like
> http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx
[quoted text clipped - 14 lines]
>>>>hand. I am using themes and looked around there but couldn't find
>>>>anything. Thanks.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.