4
Answers

fileupload

Lasantha PW

Lasantha PW

13y
2.2k
1
hi all

here my code

 <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
 
       
<ContentTemplate> 
        
           
<asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click" /> 
           
<asp:Panel ID="Panel1" runat="server" Visible="false"> 
       
<asp:FileUpload ID="FileUpload1" runat="server" />    
           
</asp:Panel> 
         
         
       
</ContentTemplate> 
       
</asp:UpdatePanel> 
             
<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton

protected void LinkButton1_Click(object sender, EventArgs e) 
       
{ 
           
if (FileUpload1.HasFile) 
           
{                 } 
       
} 
 
       
protected void Button2_Click(object sender, EventArgs e) 
       
{ 
           
Panel1.Visible = true; 
       
}

fileupload is working when without asp panel. my question is when i put a asp panel it doesnt work. i handle panel visible from code behind

thanks
Answers (4)