Jquery Text Box
Comma Separate in ASP.net
Step1:Craete one sample website
Step2:Add this links in the head part
<script type='text/javascript' src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type='text/javascript'
src="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.js"></script>
<link rel="stylesheet"
type="text/css"
href="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.css"
/>
Step3:For style sheet add this lines
<style type='text/css'>
#wrapper
{
margin: 20px;
}
</style>
Step4:For jquery Add this lines
<script type='text/javascript'>//<![CDATA[
$(window).load(function () {
$('#tag1').tagsInput({
});
});
</script>
Step5:Add this
content in the body part
<div id="wrapper">
<p>
This is a basic tag input:
<input id="tag1" value="alpha,beta,gamma"
/>
</p>
</div>
The whole content like this
<%@ Page
Title="Home
Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs"
Inherits="WebApplication1._Default"
%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<script type='text/javascript'
src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type='text/javascript'
src="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.js"></script>
<link rel="stylesheet"
type="text/css"
href="http://xoxco.com/projects/code/tagsinput/jquery.tagsinput.css"
/>
<style type='text/css'>
#wrapper
{
margin: 20px;
}
</style>
<script type='text/javascript'>//<![CDATA[
$(window).load(function () {
$('#tag1').tagsInput({
});
});
</script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<div id="wrapper">
<p>
This is a basic tag input:
<input id="tag1" value="lokesh,lokeshtec@gmail.com,949217939"
/>
</p>
</div>
</asp:Content>
Oup Put