I want to split text into two parts after ":" using ASP.Net C#
I have a text, I want to split it into 2 parts. One part before ":" and other part after ":" and display it in Label.
Please reply.
This Way:
string text = "Azim:Shaikh"; string name = text.Substring(0, text.IndexOf(":")); string sirName = text.Substring(text.IndexOf(":") + 1);
Now in Name you will get azim and in sirName you will get Shaikh
Thank You.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.