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.Regular Expression to allow Enter Key in MultiLine TextBox in ASP.Net<p>HiSumeet,</p> <p>You should add special character for new line into regex pattern.</p> <p>Check this example. Now please take its reference and correct your code.</p> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <pre class="brush: html">&lt;asp:TextBox runat=&#34;server&#34; ID=&#34;txtaddress&#34; TextMode=&#34;MultiLine&#34; /&gt; &lt;asp:RegularExpressionValidator Display=&#34;Dynamic&#34; ID=&#34;RegularExpressionValidator1txtaddress&#34; ControlToValidate=&#34;txtaddress&#34; runat=&#34;server&#34; ErrorMessage=&#34;Only alphabet &amp; space allowed. Max. 300 chars&#34; ValidationGroup=&#34;reg&#34; CssClass=&#34;valmsg&#34; ValidationExpression=&#34;[a-zA-Z \r\n]{1,300}$&#34;&gt;&lt;/asp:RegularExpressionValidator&gt; &lt;asp:Button Text=&#34;Save&#34; runat=&#34;server&#34; ValidationGroup=&#34;reg&#34; /&gt;</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><strong><span style="text-decoration: underline;"><img src="https://i.imgur.com/lJPhwC8.gif" alt="" width="247" height="169" /></span></strong></p>https://www.aspforums.net:443/Threads/556704/Regular-Expression-to-allow-Enter-Key-in-MultiLine-TextBox-in-ASPNet/https://www.aspforums.net:443/Threads/556704/Regular-Expression-to-allow-Enter-Key-in-MultiLine-TextBox-in-ASPNet/Tue, 12 Mar 2019 02:20:20 GMT