ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.RegularExpression Validator (Regex) to check whether string has Dot and Hyphen ASP.Net<p>Here I have created sample that full-fill your requirement using RegularExpressionValidatior.</p> <p><span style="text-decoration: underline;">HTML</span></p> <pre class="brush: html">&lt;div&gt; Name : &lt;asp:TextBox ID=&#34;txtName&#34; runat=&#34;server&#34; /&gt; &lt;asp:RegularExpressionValidator runat=&#34;server&#34; ControlToValidate=&#34;txtName&#34; ValidationExpression=&#34;^([a-zA-Z]+)[.]\s?([a-zA-Z]+)[-]([a-zA-Z]+)$&#34; ErrorMessage=&#34;Invalid Name Format&#34; ForeColor=&#34;Red&#34;&gt;&lt;/asp:RegularExpressionValidator&gt; &lt;/div&gt;</pre> <p><span style="text-decoration: underline;">Screenshot</span></p> <p><img src="https://i.imgur.com/yZKe2lu.gif" alt="" width="420" height="57" />&nbsp;</p>https://www.aspforums.net:443/Threads/183398/RegularExpression-Validator-Regex-to-check-whether-string-has-Dot-and-Hyphen-ASPNet/https://www.aspforums.net:443/Threads/183398/RegularExpression-Validator-Regex-to-check-whether-string-has-Dot-and-Hyphen-ASPNet/Mon, 20 Jul 2015 06:26:13 GMT