CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_web_developer_2005_express Tags:
Item Type: NewsGroup Date Entered: 10/5/2005 10:22:10 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 357 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
Hoof Hearted
Asp.Net User
DataFormatstring10/5/2005 10:22:10 AM

0

I've searched the help file, but I can't find a way to construct a DataFormatString via the gui. Do I have to type it in manually into my code? For example, I want a text box on my page to display a date in the format dd/mm/yyy. How do I do this?
adec
Asp.Net User
Re: DataFormatstring10/5/2005 11:59:39 AM

0

You can pretty much display the Date string in any way you want by using the IFormattable interface. You may e.g do it like this:


Dim dateStr As String = DateTime.Now.ToString("dd/mm/yyyy")

or maybe like this:

Dim dateStr As String = (CType(myDateValueFromDB, DateTime)).ToString("dd/mm/yyyy")

To learn more about how to format Date, Currency, Numbers etc., start here.

Regards

Andre Colbiornsen
---------------------------------
[MVP Visual Developer Asp.Net]
Sonnenburg Communications
Friisgatan 33,
SE-214 21 Malm?
Sweden
Mob.: +46-(0)708-97 78 79
Mail: [email protected]
--------------------------------
Hoof Hearted
Asp.Net User
Re: DataFormatstring10/5/2005 12:54:01 PM

0

I know you can type them into your code. I was asking if they can be built via the GUI. For example, I come from an MS Access background. If I design a form in Access and add a Text Box to it, I can choose from a list of inbuilt formats for that Text Box. In ASP.NET I designed a datagrid control recently. One of the properties for a given column was: DataFormatString="{0:dd/MM/yy}". It would be nice if there was a way of choosing this from a list in ASP.NET
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 3.5 in VB 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 956, Published: 2007
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1464, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP.NET 2.0 in VB 2005 Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
PROFESSIONAL ASP.NET 2.0 DATABASES Authors: Thiru Thangarathinam, Pages: 528, Published: 2007

Web:
BoundField.DataFormatString Property (System.Web.UI.WebControls) Public Overridable Property DataFormatString As String ... Use the DataFormatString property to specify a custom display format for the values displayed in ...
BoundColumn.DataFormatString Property The data format string consists of two parts, separated by a colon, in the form { A: Bxx }. For example, the formatting string {0:F2} displays a fixed-point ...
Can't use DataFormatString to format DateTime - ASP.NET Forums I have teawked the property of the gridview so that ApplyFormatInEditMode=True DataFormatString="{0:dd/MM/yyyy}" but to my surprise I now ...
BoundColumn.DataFormatString Property Use the DataFormatString property to specify the display format for data in the ... The following example demonstrates how to use the DataFormatString ...
dotNETspidor: Asp.net GridView DataFormatString not working Nov 11, 2008 ... People have reported that the DataFormatString property of ... Why asp.net GridView's DataFormatString is not working in asp.net 2.0? ...

DataFormatstring - ng.asp-net-forum.visual_web_developer_2005_express DataFormatstring, > ROOT > NEWSGROUP > Asp.Net Forum > visual_studio. visual_web_developer_2005_express, Date: 10/5/2005 10:22:10 AM, Replies: 2, Views: 349, ...
help with CSS for DataGrid - ng.asp-net-forum.getting_started ...
format a boundfield - general_asp.net.data_presentation_controls DataFormatString Property (System.Web.UI.WebControls) Use the DataFormatString property to specify a custom display format for the values displayed in the ...
Help with nested UpdatePanels - asp.net_ajax.asp.net_ajax_ui ...
BoundField - ng.asp-net-forum.getting_started WebControls) Use the DataFormatString property to specify a custom display format for the values displayed in the BoundField object. ...












mdf file on network share and trace 1807

unusual 'unable to cast object of type' error

edit sql server object permissions via vwd

how to make a print button??

code in a separate file

sql connection

error the moment i open file in visual web development 2005 express edition

add new detailview help

adding sqldatasource to mobile web form

class library in vwd

newbie vwd guided tour - adding update functionality lesson

visual web developer express hangs when exiting web page

images wont display - style sheet

cannot databind to userid "databinding: 'system.web.profile.defaultprofile' does not contain a property with the name 'userid'. "

stored proceedures

please help! how can you cut and paste table data from a website?

this is ridiculous!!!

server error: cannot open file "default.aspx" for writing.

design-time features

installation directories

ajax extensions

application ok on vwd, crashes on iis

connection problem

prebuild compiled page

why can't document outline scroll down?

errors in dutch - vwd 2005 express

where is the spellchecker?

how do i totally remove a project that i just created for testing?

creating a web server to interface with remote ip using serial port.

system.invalidoperationexception: failed to map the path '/'.

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT