Show ImageButton of DataList as Thumbnail

Discussion in 'Software' started by tapasmahata, Jan 15, 2008.

  1. tapasmahata

    tapasmahata

    Joined:
    Jan 12, 2008
    Messages:
    7
    Likes Received:
    0
    Location:
    Kolkata
    I have a Datalist which has imagebutton as one of it's item templates. I am binding the ImageButton ImageUrl at runtime. I had manually resize the imagebutton but now I want to view the images aas thumbnails. Please Help me...


    HTML Code :

    <asp:datalist id="listImage" style="Z-INDEX: 101; LEFT: 344px; POSITION: absolute; TOP: 48px"
    runat="server" Height="152px" Width="416px" BorderColor="SkyBlue" RepeatColumns="3" OnItemCommand="Show" GridLines="Both">
    <SeparatorStyle HorizontalAlign="Center" ForeColor="Aqua" BorderStyle="Solid" VerticalAlign="Middle"
    BackColor="Fuchsia"></SeparatorStyle>
    <ItemTemplate>
    <P align="center">
    <asp:ImageButton id=myImage Height="50px" Width="50px" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"pid","http://designindia.com/demo/images/{0}.jpg")%>' Runat="server" CommandName="ShowImage" AlternateText='<%#DataBinder.Eval(Container.DataItem,"pid") %>' ImageAlign="Baseline">
    </asp:ImageButton>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label id="myLabel" Height="1px" Width="1px" Runat="server" Visible="False"></asp:Label>
    <asp:Button id=myHiddenBtn1 runat="server" Height="24px" Width="80px" Text='<%# DataBinder.Eval(Container.DataItem,"pname")%>' Visible="False">
    </asp:Button>
    <asp:Button id=myHiddenBtn2 runat="server" Height="24px" Width="80px" Text='<%# DataBinder.Eval(Container.DataItem,"psize")%>' Visible="False">
    </asp:Button><!%# DataBinder.Eval(Container.DataItem,"pname")%></P>
    </ItemTemplate>
    </asp:datalist>
     
    tapasmahata, Jan 15, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.