Hi nauna,
Check this example. Now please take its reference and correct your code.
For this i have used jQuery tagit plugin.
For more details refer below link.
http://aehlke.github.io/tag-it/
HTML
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tag-it/2.0/js/tag-it.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/tag-it/2.0/css/jquery.tagit.css" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/tag-it/2.0/css/tagit.ui-zendesk.css" />
<script type="text/javascript">
$(function () {
$("#txtTags").tagit();
});
</script>
<asp:TextBox ID="txtTags" runat="server"></asp:TextBox>
<asp:Button Text="Save" runat="server" OnClick="Save" />
Code
C#
protected void Save(object sender, EventArgs e)
{
string tags = "Tags are :\\n";
foreach (string input in txtTags.Text.Split(','))
{
tags += input + "\\n";
}
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('" + tags + "')", true);
}
VB.Net
Protected Sub Save(ByVal sender As Object, ByVal e As EventArgs)
Dim tags As String = "Tags are :\n"
For Each input As String In txtTags.Text.Split(","c)
tags += input & "\n"
Next
ClientScript.RegisterClientScriptBlock(Me.GetType(), "", "alert('" & tags & "')", True)
End Sub
Screenshot