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('###-###-####'));