I'm having some trouble setting the image of an XfaImageField.
What I have so far is:
- Code: Select all
if (xfaField is XfaImageField){
XfaImageField xf = xfaField as XfaImageField;
if (xf.Name=="topmostSubform[0].Page1[0].ImgSignatur[0]"){
Image MyImage = Image.FromFile(@"C:\ASPdotNET_logo.jpg");
var msy = new MemoryStream();
MyImage.Save(msy, System.Drawing.Imaging.ImageFormat.Jpeg);
msy.Position = 0;
xf.Image = msy;
}
}
I also found this (de url:ized but from here):
/forum/changing-the-image-on-a-button-t5794.html
which seems very similar, but somehow I keep getting "method not found" on the row where I try to set the image:
xf.Image = msy;
Any ideas on what I'm doing wrong?
Cheers!
/Eskil