Hi
This error
The Error is
"There is no source code available for the current location"
is due to you are not having a script manager.
As an example...
the aspx content..
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<script type="text/javascript" language="javascript">
function Test(sender,e) {
alert("EmpImages/" + e.get_fileName());
document.getElementById('<%=ImgFoto.ClientID %>').src = "EmpImages/" + e.get_fileName();
}
</script>
<asp:AsyncFileUpload ID="FupFoto" runat="server" OnClientUploadComplete="Test" ClientIDMode="AutoID" OnUploadedComplete="FupFoto_UploadedComplete"/>
<asp:Image ID="ImgFoto" runat="server" ImageUrl="" />
</asp:Content>
in the upload complete event...
protected void FupFoto_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
{
if (FupFoto.HasFile)
{
string strPath = MapPath("~/EmpImages/") + Path.GetFileName(e.filename);
FupFoto.SaveAs(strPath);
}
}
it should be working in this example