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.Replace Number with Alphabet in C# and VB.Net<p>Hi <a class="username" rel="anirudhp"> anirudhp</a>,</p> <p>Refer below sample.</p> <p><span style="text-decoration: underline;"><strong>Code</strong></span></p> <p><strong>C#</strong></p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { string num = &#34;123221760&#34;; num = num.Replace(&#34;1&#34;, &#34;a&#34;).Replace(&#34;2&#34;, &#34;b&#34;).Replace(&#34;3&#34;, &#34;c&#34;).Replace(&#34;4&#34;, &#34;d&#34;).Replace(&#34;5&#34;, &#34;e&#34;) .Replace(&#34;6&#34;, &#34;f&#34;).Replace(&#34;7&#34;, &#34;g&#34;).Replace(&#34;8&#34;, &#34;h&#34;).Replace(&#34;9&#34;, &#34;i&#34;).Replace(&#34;0&#34;, &#34;j&#34;); Response.Write(num); }</pre> <p><strong>VB.Net</strong></p> <pre class="brush: vb">Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load Dim num As String = &#34;123221760&#34; num = num.Replace(&#34;1&#34;, &#34;a&#34;).Replace(&#34;2&#34;, &#34;b&#34;).Replace(&#34;3&#34;, &#34;c&#34;).Replace(&#34;4&#34;, &#34;d&#34;).Replace(&#34;5&#34;, &#34;e&#34;).Replace(&#34;6&#34;, &#34;f&#34;).Replace(&#34;7&#34;, &#34;g&#34;).Replace(&#34;8&#34;, &#34;h&#34;).Replace(&#34;9&#34;, &#34;i&#34;).Replace(&#34;0&#34;, &#34;j&#34;) Response.Write(num) End Sub</pre> <p><span style="text-decoration: underline;"><strong>Output</strong></span></p> <p><span style="color: #000000; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;">abcbbagfj</span></p>https://www.aspforums.net:443/Threads/258847/Replace-Number-with-Alphabet-in-C-and-VBNet/https://www.aspforums.net:443/Threads/258847/Replace-Number-with-Alphabet-in-C-and-VBNet/Tue, 04 Jun 2019 08:49:58 GMT