Posted on: 11/15/2012 12:09:04 AM | Views : 369

I have a basic asp.net page with an image upload loaded through an iframe:


<asp:Panel runat="server"> <asp:TextBox runat="server" id="imgCaption" CssClass="imgCaption" PlaceHolder="caption(optional)" /> <asp:FileUpload runat="server" ID="programmImages" Width="200px" CssClass="offScreen" /> <asp:Button runat="server" id="hiddenImageUpload" OnClick="UploadImage" CssClass="insButton" Text="Upload" /> </asp:Panel> the image upload depends on the route data in order to upload but whenever i try to upload the image i get this error:


Object reference not set to an instance of an object


on this line:


var ProgName = Page.RouteData.Values["prog"].ToString();


this line works fine in other pages.

so ...

Go to the complete details ...