My controller returns a string which is a url of an image of an external site.
How do I display that url on the view.
I appreciate your help.
My controller returns a string which is a url of an image of an
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AngryHacker is correct. I am just expanding AngryHacker’s answer with some code example.
Add a property in your ViewModel for the image url and return it in the first get call. Then use it in the View. Thus you are avoiding an unnecessary http request to to the action again
and in your ACtionMethod,
and in the View which is strongly typed to your UserProfileViewModel,