[CLOSED] how do i assign image to <ext:image > from file uploader

  1. #1

    [CLOSED] how do i assign image to <ext:image > from file uploader

    hello
    I want to assign images directly from FileUploadField to ext Image here is my code
    <ext:Image
                                                        ID="imgImageFile"
                                                        Width="150"
                                                        Height="150"
                                                        runat="server" />
    
                                                    <ext:FileUploadField
                                                        ID="fufImage"
                                                        runat="server"
                                                        ButtonOnly="true"
                                                        ButtonText=""
                                                        Icon="Attach">
                                                      
                                                    </ext:FileUploadField>
    Last edited by Daniil; Apr 16, 2013 at 5:32 AM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi @amida,

    If I have got it correctly, you need an HBoxLayout.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Container 
                runat="server" 
                Width="300" 
                Height="50" 
                Layout="HBoxLayout">
                <Items>
                    <ext:Image runat="server" ImageUrl="resources/images/test.png" Width="30" />
                    <ext:FileUploadField runat="server" Flex="1" />
                </Items>
            </ext:Container>
        </form>
    </body>
    </html>
  3. #3
    thank u Daniil

    i want to assign the selected image file from FileUploadField to image ImgUrl property directly
  4. #4
    Hello!

    Quote Originally Posted by amida View Post
    thank u Daniil

    i want to assign the selected image file from FileUploadField to image ImgUrl property directly
    You have to upload selected image to the server and only then you will be able to assign it to ImageUrl because your browser doesn't have access to user's file system.

Similar Threads

  1. Replies: 1
    Last Post: May 16, 2012, 12:57 PM
  2. [CLOSED] ext:Image - How I can show a menu when click in ext:Image?
    By supera in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 10, 2012, 8:56 PM
  3. [CLOSED] File Dialog on Image Click
    By jwf in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: May 21, 2011, 10:03 AM
  4. [CLOSED] How to assign Image to button through CSS
    By sriram in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 10, 2010, 6:57 AM
  5. [CLOSED] Download image file
    By skyone in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 04, 2010, 12:08 PM

Posting Permissions