0

I have a Client table in my database. in which there is one field image, in which the name of the file is stored. Now i want that when i save the data the image should store in image folder of my project and the name of image(filename) should store in database?. How can i do that? Also if i want to edit the data of client then respective client image should display in a panel . i want the image to be display in imagefield

<ext:Panel ID="Panel1" runat="server" Height="370"  RowSpan="3" Width="300"  Title="Upload Visiting card">
    <Items>
          <ext:Image ID="Image1" runat="server" Height="300" Padding="10">
                    </ext:Image>
        <ext:FileUploadField ID="FileUploadField1" runat="server" FieldLabel="Upload Image" 
        Width="285" LabelWidth="70" >
        </ext:FileUploadField>
    </Items>
</ext:Panel>

How can i do that in ext.net?

vaishali
  • 153
  • 1
  • 7
  • 19

1 Answers1

0

Please, take a look on these examples:

http://examples.ext.net/#/Miscellaneous/Image/Resizable/ http://examples.ext.net/#/Form/FileUploadField/Basic/

To display image from DB usually is better to create Generic Handler (ashx) and set ImageUrl to this handler with image Id.

The example above gives the basic understanding of files uploading. There is a lot of examples about saving of images on ASP.NET. For instance, http://www.codeproject.com/Articles/126421/Image-Handling-In-ASP-NET and http://csharpdotnetfreak.blogspot.com/2009/07/fileupload-control-save-images-database.html

Baidaly
  • 1,829
  • 1
  • 15
  • 16
  • As we write in asp.net C# (without the ext.net) to save the image in image folder as below FileUpload1.SaveAs(Server.MapPath("images") + "/" + FileUpload1.FileName); So I want to know what we can write using ext.net to save image in image folder????? – vaishali Dec 31 '12 at 12:01