File Uploaded Control Track File Name with in Update Panel

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 525
File Uploaded Control Track File Name with in Update Panel
===================================================
protected void bt_Submit_Click(object sender, EventArgs e)
{
if (!fup1.HasFile)
{

}
else
{
HttpPostedFile http = fup1.PostedFile;
Response.Write(http.FileName);
}
}

<asp:UpdatePanel ID="up1" runat ="server" >
<ContentTemplate>
<asp:FileUpload ID="fup1" runat ="server" />
<asp:Button ID="bt_Submit" runat ="server" Text ="Submit"
onclick="bt_Submit_Click" />
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID ="bt_Submit" />
</Triggers>
</asp:UpdatePanel>

Comments or Responses

Login to post response