i want to show the image in window.open from image path where it is stored in java scripts.
function DownloadFile(id) { $.ajax({ type: "POST", url: '<%=ResolveUrl("~/Account/UserManagement.aspx/DownloadFiles")%>', data: "{'id':'" + id + "'}", contentType: "application/json; charset=utf-8", datatype: "json", success: function (data) { var msg = eval('(' + data.d + ')'); var url = msg[0].FilePath; img = '<img src="' + url + '">'; popup = window.open(img);
.CS Code
[WebMethod] public static string DownloadFiles(string id) { string data = string.Empty; try { DataTable dt = MasterEntry.GetFileName(id); var obj = from row in dt.AsEnumerable() select new { FilePath = row["FilePath"].ToString(), }; JavaScriptSerializer serializer = new JavaScriptSerializer(); data = serializer.Serialize(obj); return data; } catch { return data; } }
plesae help me as soon as possible