[ kenoo84 @ 17.08.2011. 22:45 ] @
| Imam sljedeci problem, prilikom snimanja podataka u bazu, izbaci mi gresku "Object reference not set to an instance of an object" i "im=null" ne znam kako da otklonim ovaj problem, pa mi treba pomoc ?
System.Drawing.Image im = System.Drawing.Image.FromStream(fImage.PostedFile.InputStream); - Object reference not set to an instance of an object "im = null"
Filmovi f = new Filmovi();
f.Naziv = ddlNaziv.Text;
f.Zanr = ddlZanr.Text;
f.Image = ConvertImage(im, System.Drawing.Imaging.ImageFormat.Jpeg);
Filmovii.snimi(f); |
[ pl4stik @ 17.08.2011. 23:07 ] @
System.Drawing.Image im = new System.Drawing.Image.FromStream(fImage.PostedFile.InputStream);
[ kenoo84 @ 17.08.2011. 23:38 ] @
Kada dodam new, dobijem podvuceno "FromStream" sa greskom "System.Drawing.Image.FromStream(System.IO.Stream, bool, bool)" is a "method" but is used like a "type" ??
System.Drawing.Image im = new System.Drawing.Image.FromStream(fImage.PostedFile.InputStream);
[ ravni @ 18.08.2011. 18:07 ] @
Citat:
kenoo84: System.Drawing.Image
im = System.Drawing.Image.FromStream(fImage.PostedFile.InputStream); - Object reference not set to an instance of an object "im = null"
ili ti je fImage == null, ili je fImage.PostedFile == null
[ kenoo84 @ 18.08.2011. 19:42 ] @
Ne , im == null , to je problem
Copyright (C) 2001-2024 by www.elitesecurity.org. All rights reserved.