Hi I have the following code in the code behind and can't load an image inside a formview. For some users I can for certain users it gives me a system null reference exception. Object not set to an instance as follows:
System.NullReferenceException: Object reference not set to an instance of an object.
Line 23: Image img = (Image)FormView1.FindControl("ProfilePicture");
Line 24: img.ImageUrl = "~/UserPages/UserPhotos/default.jpg";
I go through the step by step debugging and everything works fine until I get to the img.ImageUrl = "~/UserPages/......" statements weather there is a picture or not.
I have two users created and for one it works fine and another it doesn't work.
It seems like it can't find the image control in formview for some users.
Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.
Exception Handling is in the core of any application that is able to dignify its name.
In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download.
This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online.
The email signature template has been downloaded from: