0
嗨,我想在asp.net上使用日期選擇器保存borthday。在我的db數據類型是Date。我試過但數據不能保存。請指教在數據庫asp.net上保存生日作爲日期類型
product.aspx
protected void button_Click(object sender, EventArgs e)
{
if (new bizObj().AddBiz(new BizEnt(Convert.ToInt32(txtBizId.Text), Convert.ToInt32(txtUserId.Text), txtBizName.Text, txtBizAddress.Text, calcbizBorn.SelectedDate, Convert.ToInt32(txtBizBooks.Text))))
{
Response.Write("Successs");
fillGird();
}
else
{
Response.Write("Error");
}
}
public Boolean AddBiz(BizEnt BizObj)
{
string qua = "exec addBiz'" + BizObj.Biz_Id + "','"
+ BizObj.User_Id + "','" + BizObj.Biz_Name + ","
+ BizObj.Biz_Address + "','" + BizObj.Biz_Born + "'"
+ BizObj.Bizr_Books + "'.'";
return (new DataAccessLayer().executeNonQuaries(qua));
}
public DateTime Biz_Born
{
get { return _BizBorn; }
set { _BizBorn = value; }
}
是有顯示任何錯誤? – 2014-11-08 06:00:46
@AnikIslamAbhi:不會迴避錯誤,但它會導致Else循環並顯示「錯誤」消息 – shumz 2014-11-08 06:03:40
您可以在此處發佈錯誤消息嗎? – 2014-11-08 06:05:18