ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - Smart Image - With obout FileUpload as data source

Upload images and you will see information about them.




ASP.NET:

<asp:UpdatePanel runat="server" ID="UpdatePanel1"><ContentTemplate>
    <obout:FileUpload Accept="image/*" ValidFileExtensions="jpeg;jpg;gif;tiff;png"
        Width="250px" runat="server" id="fileUpload1" BrowseFieldDescription="Images"
    />
    <br /><asp:Button runat="server" ID="submit" Text="Upload files" /><br /><br />

    <asp:ListView ID="lvMain" runat="server" DataSourceID="fileUpload1"
                    GroupItemCount="3" EnableViewState="false"
                    GroupPlaceholderID="ContactRowContainer"
                    ItemPlaceholderID="ContactItemContainer">
        <LayoutTemplate>
            <table cellpadding="4" runat="server" id="tblContacts">
                <tr runat="server"><th colspan="3" runat="server"><b>Uploaded images</b></th></tr>
                <tr runat="server" id="ContactRowContainer" />
            </table>
        </LayoutTemplate>
        <GroupTemplate>
            <tr runat="server" id="ContactRow"><td runat="server" id="ContactItemContainer" /></tr>
        </GroupTemplate>
        <EmptyItemTemplate>
            <td class="item" runat="server"></td>
        </EmptyItemTemplate>
        <ItemTemplate>
            <td class="item" runat="server" style="border: 1px solid black;" align="left">
                <obout:SmartImage ID="smImage" runat="server" BinaryValue='<%# Eval("ContentBinary") %>' Height="100px"
                                    GetImageMode="HttpHandler" OptimizeMode="Fit" />
                <table cellpadding="3" style="font-family: Tahoma; font-size: 11px; ">
                    <tr>
                        <td align="left" valign="middle" ><b>File name</b></td>
                        <td align="left" valign="middle" ><%# Eval("FileName") %></td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle" ><b>Content type</b></td>
                        <td align="left" valign="middle" ><%# Eval("ContentType") %></td>
                    </tr>
                    <tr>
                        <td align="left" valign="middle" ><b>Content length</b></td>
                        <td align="left" valign="middle" ><%# Eval("ContentLength").ToString() %></td>
                    </tr>
                </table>
            </td>
        </ItemTemplate>
    </asp:ListView>
</ContentTemplate></asp:UpdatePanel>
    

"This product is awesome... And affordable also, which is so nice."

Jonathan Maynard

Random testimonial   All testimonials