my Code is below
我的代码如下
@Ajax.ActionLink("Choose File",
"chooseItemView",
new { },
new AjaxOptions
{
UpdateTargetId = "replaceDiv",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET",
//OnBegin = "startPreLoader",
OnSuccess = "stopPreLoader",
OnFailure = "stopPreLoader"
}, new
{
@id=1,
@type="file",
@class="btn btn-primary offset-top-2",
/*@id=item.GetHashCode().GetHashCode(),
* onclick = "fileUploadFunction('" + item.GetHashCode().GetHashCode() + "')"*/
onclick = "fileUploadFunction('" + 1 + "')"
})
public ActionResult chooseItemView()
{
/*MessageBox.Show("Hi");*/
OpenFileDialog openFileDialog=new OpenFileDialog();
openFileDialog.Multiselect = false;
openFileDialog.Filter = "txt files (*.txt)|*.txt| DOC files (*.doc)|*.doc";
openFileDialog.ShowDialog();
return PartialView("_UploadItemView",null);
}
@Ajax.ActionLink("