Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

System.NullReferenceException

[es] :: .NET :: ASP.NET :: System.NullReferenceException

[ Pregleda: 1488 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

kenoo84
Banja Luka

Član broj: 288833
Poruke: 13
109.175.46.*



+9 Profil

icon System.NullReferenceException17.08.2011. u 22:45 - pre 154 meseci
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);
 
Odgovor na temu

pl4stik
Senior .NET programmer/Consultant
oDesk
NI na nebu NI na zemlji

Član broj: 173596
Poruke: 715
*.dynamic.isp.telekom.rs.

Sajt: xx-auth.com.azhar.arvixe...


+31 Profil

icon Re: System.NullReferenceException17.08.2011. u 23:07 - pre 154 meseci
System.Drawing.Image im = new System.Drawing.Image.FromStream(fImage.PostedFile.InputStream);
To sto nekoliko miliona ljudi tvrdi da nisi u pravu ne znaci da stvarno nisi - Frank Zappa

https://youtu.be/DLe358DPGXU
 
Odgovor na temu

kenoo84
Banja Luka

Član broj: 288833
Poruke: 13
109.175.46.*



+9 Profil

icon Re: System.NullReferenceException17.08.2011. u 23:38 - pre 154 meseci
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);
 
Odgovor na temu

ravni

Član broj: 8894
Poruke: 373



+15 Profil

icon Re: System.NullReferenceException18.08.2011. u 18:07 - pre 154 meseci
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
 
Odgovor na temu

kenoo84
Banja Luka

Član broj: 288833
Poruke: 13
109.175.40.*



+9 Profil

icon Re: System.NullReferenceException18.08.2011. u 19:42 - pre 154 meseci
Ne , im == null , to je problem
 
Odgovor na temu

[es] :: .NET :: ASP.NET :: System.NullReferenceException

[ Pregleda: 1488 | Odgovora: 4 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.