Hi,
I am trying to create a web form that allows users to upload files. I want to be able to provide the user with a link to add as many FileInput conrols as they need since they may have more than 1 file to upload. I can create a static version of this no problem.
I have a linkButton that is wired to the following method that should (in theory) add a new HtmlInputFile to a placeholder..
private void addFileUpload_Click(object sender, System.EventArgs e)
{
plc_files.Controls.Add(new System.Web.UI.HtmlControls.HtmlInputFile());
}
but this throws an error : Object reference not set to an instance of an object
Can anyone help please?
TIA
Affleck
I am trying to create a web form that allows users to upload files. I want to be able to provide the user with a link to add as many FileInput conrols as they need since they may have more than 1 file to upload. I can create a static version of this no problem.
I have a linkButton that is wired to the following method that should (in theory) add a new HtmlInputFile to a placeholder..
private void addFileUpload_Click(object sender, System.EventArgs e)
{
plc_files.Controls.Add(new System.Web.UI.HtmlControls.HtmlInputFile());
}
but this throws an error : Object reference not set to an instance of an object
Can anyone help please?
TIA
Affleck