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.Split string and display in ASP.Net TextBoxes using C# and VB.Net<p>Hey <a class="username" rel="akhter">akhter</a>,</p> <p>Please refer below sample.</p> <p><span style="text-decoration: underline;"><strong>HTML</strong></span></p> <pre class="brush: html">Date :&lt;br /&gt; &lt;asp:TextBox runat=&#34;server&#34; ID=&#34;txtDate&#34; /&gt; &lt;br /&gt; Status :&lt;br /&gt; &lt;asp:TextBox runat=&#34;server&#34; ID=&#34;txtStatus&#34; /&gt; &lt;br /&gt; Code:&lt;br /&gt; &lt;asp:TextBox runat=&#34;server&#34; ID=&#34;txtCode&#34; /&gt;</pre> <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) { &nbsp;&nbsp;&nbsp; string number = "20180526044400022000094"; &nbsp;&nbsp;&nbsp; txtDate.Text = Convert.ToDateTime(number.Substring(0, 8).Insert(4, "/").Insert(7, "/")).ToString("dd-MM-yyyy")+" "+number.Substring(8, 4).Insert(2, ":");&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; txtStatus.Text = number.Substring(12, 4); &nbsp;&nbsp;&nbsp; txtCode.Text = number.Substring(16, 7); }</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 &nbsp;&nbsp;&nbsp; Dim number As String = "20180526044400022000094" &nbsp;&nbsp;&nbsp; txtDate.Text = Convert.ToDateTime(number.Substring(0, 8).Insert(4, "/").Insert(7, "/")).ToString("dd-MM-yyyy") + " " + number.Substring(8, 4).Insert(2, ":") &nbsp;&nbsp;&nbsp; txtStatus.Text = number.Substring(12, 4) &nbsp;&nbsp;&nbsp; txtCode.Text = number.Substring(16, 7) End Sub</pre> <p><span style="text-decoration: underline;"><strong>Screenshot</strong></span></p> <p><img src="https://i.imgur.com/a9wsl2v.jpg" alt="" width="246" height="267" /></p>https://www.aspforums.net:443/Threads/920130/Split-string-and-display-in-ASPNet-TextBoxes-using-C-and-VBNet/https://www.aspforums.net:443/Threads/920130/Split-string-and-display-in-ASPNet-TextBoxes-using-C-and-VBNet/Thu, 13 Dec 2018 05:23:01 GMT