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
Nazneen Sayed
NA
32
4.4k
Help Regarding Not displaying tag ID in a textbox
Mar 28 2017 3:22 AM
Hi,
i have build a Project where Employee Swipes their RFID card and its saved in to database.
i Have a textbox name txtSwipe in which Employees TAG id is getting displayed and other processes like Progressbar and different type of messages all are attached with that txtSwipe. i have written code on Mouse CLick Event of txtSwipe.
now when Employee Swipes his/her card i dont want that Tag ID to be displayed to the USER also ON this click event only data is getting properly saved into database if i post code in text changed event or any other data is not getting saved properly.
code i am using is here :
<pre> try
{
this.Cursor = Cursors.WaitCursor;
label1.Text = "Working...";
Application.DoEvents();
SqlConnection con = new SqlConnection(str);
con.Open();
SqlCommand cmd = new SqlCommand("Insert into Datatab(rfid) values (@rfid)", con);
cmd.Parameters.AddWithValue("@rfid", txtSwipe.Text);
cmd.ExecuteNonQuery();
con.Close();
txtSwipe.ResetText();
label1.Text = "Done";
}
catch (Exception ex)
{
label1.Text = "Error";
MessageBox.Show(ex.Message);
}
finally
{
this.Cursor = Cursors.Default;
}
int i;
progressBar1.Minimum = 0;
progressBar1.Maximum = 200;
for (i = 0; i <= 200; i++)
{
progressBar1.Value = i;
}
Please Help.
Reply
Answers (
1
)
how to select record show in gridview in asp.net
how to avoid nested for looping for improved performance?