Show ImageButton of DataList as Thumbnail

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

  1. tapasmahata

    tapasmahata

    Joined:
    Jan 12, 2008
    Messages:
    7
    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. saraswathyrajaram

    vb.net datalist problem

    saraswathyrajaram, Aug 21, 2006, in forum: Software
    Replies:
    0
    Views:
    742
    saraswathyrajaram
    Aug 21, 2006
  2. aspnetNewbie

    How do I reference a radio button in a datalist control

    aspnetNewbie, Apr 30, 2007, in forum: General Computer Support
    Replies:
    0
    Views:
    1,134
    aspnetNewbie
    Apr 30, 2007
  3. tapasmahata
    Replies:
    0
    Views:
    950
    tapasmahata
    Jan 18, 2008
  4. Propp
    Replies:
    0
    Views:
    1,543
    Propp
    Jun 6, 2010
  5. subashini

    check box in datalist

    subashini, Mar 1, 2012, in forum: General Computer Support
    Replies:
    4
    Views:
    1,471
    subashini
    Mar 2, 2012
Loading...

Share This Page