TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Deepak Awashti
NA
301
74.6k
how to used store multiple data in textbox move single data
Dec 21 2015 6:28 AM
how to used store multiple data in textbox in saparation in comma ,move single selected word in listbox using c# code
------------------------- Source Code -----------------------------------------
<textarea ID="Textarea1" runat="server" rows="10" cols="50"></textarea>
<asp:ListBox style="text-align:right" ID="List2" runat="server" Height="100px" Width="300px"></asp:ListBox>
<asp:Button ID="Button1" runat="server" Text="Move Data" OnClick="Button1_Click1" />
-------------------------- Page Load Code----------------------
DataTable dt=null;
if(ViewState["data"]==null)
{
DataTable dt = new DataTable();
dt.Columns.Add("ColumnID");
ViewState["data"] = dt;
}
----------------------- Button Code-------------------------------
protected void Button1_Click1(object sender, EventArgs e)
{
string str = Textarea1.Value.Trim();
dt = (DataTable)ViewState["data"];
dt.Rows.Add(str);
ViewState["data"] = dt;
List2.DataSource = dt;
List2.DataValueField = "ColumnID";
List2.DataBind();
}
please help me....
Reply
Answers (
1
)
how to add below function to image in asp.net
how to know current location using c#?