hi,there. I'm using a file upload controller for uploading the user's photo? but I got the Object "reference not set to an instance of an object" Error on this statement:
int fileSize = fileUpload.PostedFile.ContentLength;
Can anyone know what the problem is? I have been looked up on the internet, but got no answer.
any help will be appreciate.
here is the code:
public partial class Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
private bool UserExists(string username)
{
if (Membership.GetUser(username) != null)
{
return true;
}
else
{
return false;
}
}
protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs e)
{
if (e.CurrentStepIndex == 0)
{
CreateUserWizard CreateUserWizardControl = (CreateUserWizard)this.LoginView1.FindControl( ...
Go to the complete details ...