473,383 Members | 1,859 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,383 software developers and data experts.

Global Formating of Text Fields

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.
Mar 3 '08 #1
4 922
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" <ra************@dads.state.tx.uswrote in message
news:e0**************@TK2MSFTNGP06.phx.gbl...
>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.

Mar 3 '08 #2
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" <RE**************************@mMvVpPsS.orgwrote in
message news:OT**************@TK2MSFTNGP05.phx.gbl...
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" <ra************@dads.state.tx.uswrote in message
news:e0**************@TK2MSFTNGP06.phx.gbl...
>>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.


Mar 3 '08 #3
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" <ra************@dads.state.tx.uswrote in message
news:u1****************@TK2MSFTNGP04.phx.gbl...
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" <RE**************************@mMvVpPsS.orgwrote in
message news:OT**************@TK2MSFTNGP05.phx.gbl...
>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" <ra************@dads.state.tx.uswrote in message
news:e0**************@TK2MSFTNGP06.phx.gbl...
>>>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.



Mar 3 '08 #4
Thanks, this does looks like a a good starting place. I'll post anything I
discover.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2******************@TK2MSFTNGP03.phx.gbl...
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" <ra************@dads.state.tx.uswrote in message
news:u1****************@TK2MSFTNGP04.phx.gbl...
>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" <RE**************************@mMvVpPsS.orgwrote in
message news:OT**************@TK2MSFTNGP05.phx.gbl...
>>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" <ra************@dads.state.tx.uswrote in message
news:e0**************@TK2MSFTNGP06.phx.gbl...
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.



Mar 3 '08 #5

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

Similar topics

2
by: Michi | last post by:
Hello, I am creating a databse with a large number of text (or blob?) entries. I want users to be able to search these fields. An example would be a forum or journal. Indexing every word in...
9
by: Paul Morrow | last post by:
I have seen the technique where a number of rows in a database are displayed in an html table so that each column of each row is editable. They use a single form surrounding the table, where each...
6
by: nate | last post by:
Hello, Does anyone know where I can find an ASP server side script written in JavaScript to parse text fields from a form method='POST' using enctype='multipart/form-data'? I'd also like it to...
2
by: kuhni | last post by:
Hi everybody! After searching newsgroups for a couple of hours, I now try asking directly (running the risk of asking again the same question). My problem is to predict when the size of the...
3
by: Frustrated Developer via DotNetMonster.com | last post by:
I have posted a couple times on here already and found the user community to be very helpful. I took on a project before I realized how difficult a time I'm having working with a database....
0
by: Ennio-Sr | last post by:
Hi all! After a very long struggle I finally succeded in transferring my old *.dbf file and the relating *.dbt (alias memo fields) to a pg table. For the time being I put the memo field in a...
2
by: JohnR | last post by:
When creating an msAccess db within the Access UI itself the fields that are text are NOT padded with blanks. For example, if I have a 10 char field and put in "HI" and then when I come back to...
3
by: John Smith | last post by:
I have two text fields in a table. One is Height, one is width. Some examples of what might be each field: Height Width 35' 35' 8' 6' 4 to 6...
7
by: Tzanko | last post by:
As we all know, there is a 8060 bytes size limit on SQL Server rows. I have a table which requires a number of text fields (5 or 6). Each of these text fields should support a max of 4000...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.