If your ASPX page is throwing exception, please check whether ScriptManager instance is added in your page or Master Page which you might be using. ScriptManager should be added after form tag in ASPX/Master page.
Once ScriptManager is present, MasterEditExtender should work, and by looking at the HTML you have provided, it will not display the mask characters and format once the data is entered. To retain the masking please set the ClearMaskOnLostFocus property for MaskedEditExtender. So the resultant HTML will be like this
<ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtPhoneNumber"
MaskType="Number" Mask="999-999-9999" MessageValidatorTip="true"
ClearMaskOnLostFocus="False" >
</ajaxToolkit:MaskedEditExtender>
Hope that helps,
Thanks