Skip to content

Inserting a Picture in a Grid table using C# ASP.Net

Kingsley Simon

Asked Sep 23, 2013, 10:02 PM EDT1 answer
Share
LinkedInX
I want to have a picture fit into a 9X9 grid table using C# ASP.Net and also when the user clicks on any section of the picture, the gridpoints of that part of the image will be recorded. 

Is it possible to do this in C# ASP.Net. 

Thanks 
Kingsley 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Ramchan
    0
    I had the same problem; solved it this way:

    <asp:ButtonField ButtonType="Image" CommandName="Photo" HeaderText="Image" ImageUrl="~/Themes/Images/EMT-001.png" > <ControlStyle CssClass="imagesize"/>
    <ItemStyle HorizontalAlign="Center" /> </asp:ButtonField>

    The CSS class is like this
    <style>
    .imagesize { width:9px; height:9px; }
    </style>

    Alternative solution: You could define height and width on the ControlStyle tag,
    instead of using a CSS class.
    ItemStyle-Width="9" ItemStyle-Height="9"
    0