急急急,asp.net datebase update問題

2009-04-16 4:14 am
我係用Microsoft Visual Studio 2008做ga
相簿黎
我有1個database~~Comment
Comment入面有,ID,Title,ImageUrl,message
咁用formview用LOAD個datebase
再係個相簿到自動搵ID自動比我進行更改,update d title,image ,message
但係呢到係咁error我
protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
{
FormView formView = (FormView)sender;
FileUpload upload = (FileUpload)formView.FindControl("ImageFileUpload");
string physicalPath = Server.MapPath("photo");
string fileTitle = Path.GetFileName(upload.FileName);
string fileName = Path.Combine(physicalPath, fileTitle);
upload.SaveAs(fileName);
e.NewValues["ImageUrl"] = string.Format("photo/{0}", fileTitle);
insert我係做到我,唔知點解update唔得

回答 (1)

2009-04-18 12:32 am
✔ 最佳答案
可唔可以講下佢比咩野 error 你呀?
你抄個 error message 出黎得唔得?


收錄日期: 2021-04-13 16:33:58
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20090415000051KK02107

檢視 Wayback Machine 備份