Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .cs file:
- public class xxModel:PageModel {
- ...
- public string UploadImage(string imageName) {
- var image = elseware.GetImage(imageName);
- string newPath = saveImage(image);
- return newPath;
- }
- }
- .cshtml file:
- var pollForImage = function (imageName) {
- var imagePath = @Model.UploadImage(imageName); //<== this is where it
- // fails.. I cannot get
- // the call to work with
- // a parameter..
- $("#image").attr("src", imagePath);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement