Live Chat Icon For mobile
Live Chat Icon

How to format a Telephone number in the xxx-xxx-xxxx format

Platform: ASP.NET| Category: Basic

VB.NET


Dim Telno As Double = Double.Parse(ds.Tables(0).Rows(0)('TelNo').ToString())
Response.Write(Telno.ToString('###-###-####'))

C#


double Telno= double.Parse(ds.Tables[0].Rows[0]['TelNo'].ToString());
Response.Write(Telno.ToString('###-###-####'));

Share with

Share on twitter
Share on facebook
Share on linkedin