我係用web-developer做ga
我而家有2個database~~table
其中1個叫photo啦~~另1個叫detail啦
detail入面有個column Name叫做 ""A ID"" 我已經將呢個Fk左去photo入面既 ID
咁點可以係1個aspx到 用formview用photo既ID自動搵到detail入面既data比我進行更改-v-
又或者可以換個方法做~~就係用1個repeater顯示到2個database既table資料
仲有個問題係點解我upload圖片既時候點解佢會話我以下句野error
protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e)
{
FormView formView = (FormView)sender;
FileUpload upload = (FileUpload)formView.FindControl("ImageFileUpload");
string physicalPath = Server.MapPath("images/photo");
string fileTitle = Path.GetFileName(upload.FileName);<---------------------
string fileName = Path.Combine(physicalPath, fileTitle);
upload.SaveAs(fileName);
e.NewValues["ImageUrl"] = string.Format("images/photo/{0}", fileTitle);
}