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

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.