This may sound weird but I think I'm the only one not having perfect success with this.
I'm getting a
System.NullReferenceException: Object reference not set to an instance of an object.
on the line
Stream imgStream = UploadFile.PostedFile.InputStream;
[NullReferenceException: Object reference not set to an instance of an object.]
DBImages.UploadImage.BtnUpload_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\official-certify\Media\SubmitJon.aspx.cs:70
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
I'm not sure why I'm getting this error. I copied the code verbatum and then added references for my other fields that I'm pulling in.
I have no idea what the stack trace is all about, like I understand stacks, but the way these are formatted makes no sense to me, although here's what's in it maybe you guys will know.
((my button is exactly the same just named BtnUpload as opposed to UploadBtn.))
If anyone could help it would be greatly appreciated. It's been driving me nuts I've run into a bunch of other errors that I've fixed, mostly missing a ";" but I've taken care of them all, this is the only one I haven't figured out yet (well unless there's more after this one is fixed)
Thanks in advance for the help