Hi pal,
I have more than one project in one solution, am just displaying the image from folder but that folder exist in another project but in same solution.
Just assume i have one project called Themes and another one orchard.web
this below script exists in themes project and image exists in orchard.web project..
the themes project is common for all layout that's why am here using. the images all exist under ~/UploadFiles/ folder.
$.ajax({
url: crudServiceBaseUrl,
data: { UserId: UD },
type: "Get",
dataType: 'json',
contentType: 'application/json; charset=utf-8',
success: function (result) {
if (result.ContactImg != null) {
----->here i want to assign the image to that image control
$(".Imgchange").attr('src', '~/UploadFiles/' + result.ContactImg.split('.')[0] + "_" + UD + result.ContactImg.split('.')[1]);
}
else {
$(".Imgchange").attr('src', '/OrchardLocal/Themes/Gentelella/Content/Images/img.jpg');
---->it's working fine due to in same project as well as it's static
}
}
});
Thanks in advance
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Bikesh SrivastavaPosted Mar 3, 2017, 9:40 AM
Naveen BishtPosted Mar 3, 2017, 9:11 AM
Gnanavel SekarPosted Mar 3, 2017, 7:00 AM
Naveen BishtPosted Mar 3, 2017, 6:56 AM