Hi Guys,
I pass back a reference to an image in json format from a web handler. This is from my contentpage called Profile.aspx
so my file variable will be something like ~Profile/Images/Image1.jpgCode:$('#fileupload').fileupload({ replaceFileInput: false, formData: function (form) { return [{ name: "txtFirstName", value: $('#txtFirstName').val() }, { name: "txtLastName", value: $('#txtLastName').val()}]; }, dataType: 'json', url: '<%= ResolveUrl("ProfileImageHandler.ashx") %>', done: function (e, data) { $.each(data.result, function (index, file) { alert($('#imgProfile')); alert(file); $('.imgProfile').attr('src', '<%= Page.ResolveUrl("' + file.toString() + '") %>'); }); } }); });
Using page.ResolveUrl isn't workingthis is what the src gets set to if I pass the above path:
what am i doing wrong. Please helpCode:src="/localhost/Profile/~/Profile/Images/big_evil.jpg"




this is what the src gets set to if I pass the above path:
Reply With Quote