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
Debasis Mohapatra
NA
381
57.2k
Edit button code
Dec 4 2018 3:18 AM
Please check the code if it is correct please say ok
protected void btnEdit_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
string id = ddlarticleno.SelectedValue;
string sql = "select * from production_stock where id=" + id + "";
connection.Open();
SqlDataAdapter dap = new SqlDataAdapter(sql, connection);
DataTable dt = new DataTable();
dap.Fill(dt);
if (dt.Rows.Count > 0)
{
txtproductionorder.Text = dt.Rows[0]["production_order_no"].ToString();
ddlarticleno.SelectedValue = dt.Rows[0]["article_no"].ToString();
txtarticedescription.Text = dt.Rows[0]["article_desc"].ToString();
txtorderedqty.Text = dt.Rows[0]["order_qty"].ToString();
txtfinishedqty.Text = dt.Rows[0]["rec_Quantity"].ToString();
}
Reply
Answers (
5
)
how to using batch file database backup and Restore using in
Error reading data from SQL Server ?