BD
unread,Oct 12, 2010, 1:41:02 PM10/12/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Sorry, the database stores the number as nvarch type without any
formatting. I want to display the number in a formatted state such as
(xxx) xxx-xxxx. I have looked for how to do this in the asp
formatting text and did get it to work, but had an issue when there
was a null value in the table. I have tried the following:
<asp:Label ID="PhoneLabel" runat="server"
Text='<%@ String.Format("{);(###) ###-####}",
Convert.ToInt64(DataBinder.Eval(Container.DataItem, "BillingPhone")))
%>' />
It gives me the following error:
FormatException was unhandled by user code. Input string was not in
a correct format.
I may be trying to do something either the hard way or in a way that
is not possible.