Wednesday, 14 January 2015

File Name Retrive After Upload Image OR Document Files Using Asp.Net C#

No comments    
categories: , , ,
File Name Retrive After Upload Image OR Document Files


Get the Name From Uploaded File or Image Name  Using Asp.net C#.


Multiple Image Upload
Image Update in Gridview   
Show Image Preview
Restrict Upload File Size
Image Insert Bind  GridView
Without Database Upload Image Show

DEMO


                           Download Coding
                  
                                              Download
                               
                              Html Coding

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
  
 <asp:FileUpload ID="FileUpload1" runat="server" />
        <br />
        <br />
        <asp:Button ID="btnUpload" runat="server"  Text="Upload " OnClick="btnUpload_Click" />
        <asp:Label ID="lblGetImageName" runat="server"></asp:Label>
  
    </div>
    </form>
</body>
</html>



C# Coding


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class UploadImageName : System.Web.UI.Page{  

  protected void Page_Load(object sender, EventArgs e)
  {  

  } 
  protected void btnUpload_Click(object sender, EventArgs e)
    {

        lblGetImageName.Text = FileUpload1.FileName; 

   }

}



















0 comments:

Post a Comment