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
mohammed shamsheer
NA
394
143.9k
Cannot reterive date from textbox and send in to object?
Feb 22 2012 12:14 AM
protected void Hardware_add_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(strConn);
con.Open();
SqlCommand ObjHardwarecmd = new SqlCommand("insert into Asset_Hardwaredetails(@hardware_id,@hardware_name,@vendor_name,@manufacturer,@hardware_description,@hardware_model,@purchase_date,@valid_up_to,@price)", con);
.
.
.
,SqlParameter Parampurchase_date=newSqlParameter("@purchase_date",SqlDbType.Date);
SqlParameter Paramvalid_up_to=new SqlParameter("@valid_up_to",SqlDbType.Date);
.
.
.
.
Parampurchase_date.Value = txtFdueon.Text;
Paramvalid_up_to.Value = txtvalid_up_to.Text;
.
.
.
SqlParameter[] ObjHardware = { Paramhard_id,Paramhardware_name, Paramvendor_name, Parammanufacturer, Paramhardware_desctiption, Paramhardware_mode, Parampurchase_date, Paramvalid_up_to, Paramprice };
ObjHardwarecmd.Parameters.AddRange(ObjHardware);
ObjHardwarecmd.ExecuteNonQuery();
Response.Redirect("Hardware_view.aspx");
,,,,,,,,,,,,,,,,,,,,,,,,,,,
Parampurchase_date.Value = txtFdueon.Text;
Paramvalid_up_to.Value = txtvalid_up_to.Text;
cant put .Text after txtFdueon and txtvalid_up_to ?????
Reply
Answers (
2
)
Impersonation in ASP.NET
Over-Lapping Menu in Asp.net