Solved

What table is my Image Button inside of?

Posted on 2004-09-28
3
269 Views
Last Modified: 2009-07-29
Please go here:

http://www.robotzgame.com/webform1.aspx

Click on the green square.



How do I find out what Table   and   Cell      the clicked image is inside of?



===C#  SOURCE================


using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace NewRobotzGame
{
      /// <summary>
      /// Summary description for WebForm1.
      /// </summary>
      public class WebForm1 : System.Web.UI.Page
      {
            protected System.Web.UI.WebControls.ImageButton ImageButton_R1C1;
            protected System.Web.UI.WebControls.ImageButton ImageButton_R1C2;
            protected System.Web.UI.WebControls.ImageButton ImageButton2;
            protected System.Web.UI.WebControls.ImageButton ImageButton3;
            protected System.Web.UI.WebControls.ImageButton ImageButton4;
            protected System.Web.UI.WebControls.ImageButton ImageButton5;
            protected System.Web.UI.WebControls.ImageButton ImageButton6;
            protected System.Web.UI.WebControls.ImageButton ImageButton7;
            protected System.Web.UI.WebControls.ImageButton ImageButton8;
            protected System.Web.UI.WebControls.ImageButton ImageButton9;
            protected System.Web.UI.WebControls.ImageButton ImageButton10;
            protected System.Web.UI.WebControls.ImageButton ImageButton11;
            protected System.Web.UI.WebControls.ImageButton ImageButton13;
            protected System.Web.UI.WebControls.ImageButton ImageButton12;
            protected System.Web.UI.WebControls.ImageButton ImageButton14;
            protected System.Web.UI.WebControls.ImageButton ImageButton15;
            protected System.Web.UI.WebControls.ImageButton ImageButton17;
            protected System.Web.UI.WebControls.ImageButton ImageButton18;
            protected System.Web.UI.WebControls.ImageButton ImageButton19;
            protected System.Web.UI.WebControls.ImageButton ImageButton20;
            protected System.Web.UI.WebControls.ImageButton ImageButton21;
            protected System.Web.UI.WebControls.ImageButton ImageButton22;
            protected System.Web.UI.WebControls.ImageButton ImageButton23;
            protected System.Web.UI.WebControls.ImageButton ImageButton24;
            protected System.Web.UI.WebControls.ImageButton ImageButton29;
            protected System.Web.UI.WebControls.ImageButton ImageButton30;
            protected System.Web.UI.WebControls.ImageButton ImageButton31;
            protected System.Web.UI.WebControls.ImageButton ImageButton32;
            protected System.Web.UI.WebControls.ImageButton ImageButton34;
            protected System.Web.UI.WebControls.ImageButton ImageButton35;
            protected System.Web.UI.WebControls.ImageButton ImageButton36;
            protected System.Web.UI.WebControls.ImageButton ImageButton1;
            protected System.Web.UI.WebControls.ImageButton ImageButton16;
            protected System.Web.UI.WebControls.ImageButton ImageButton25;
            protected System.Web.UI.WebControls.ImageButton ImageButton33;
            protected System.Web.UI.WebControls.ImageButton ImageButton37;
            protected System.Web.UI.WebControls.ImageButton ImageButton38;
            protected System.Web.UI.WebControls.ImageButton ImageButton39;
            protected System.Web.UI.WebControls.ImageButton ImageButton40;
            protected System.Web.UI.WebControls.ImageButton ImageButton41;
            protected System.Web.UI.WebControls.ImageButton ImageButton42;
            protected System.Web.UI.WebControls.ImageButton ImageButton43;
            protected System.Web.UI.WebControls.ImageButton ImageButton44;
            protected System.Web.UI.WebControls.ImageButton ImageButton45;
            protected System.Web.UI.WebControls.ImageButton ImageButton46;
            protected System.Web.UI.WebControls.ImageButton ImageButton47;
            protected System.Web.UI.WebControls.ImageButton ImageButton48;
            protected System.Web.UI.WebControls.ImageButton ImageButton49;
            protected System.Web.UI.WebControls.ImageButton ImageButton50;
            protected System.Web.UI.WebControls.ImageButton ImageButton51;
            protected System.Web.UI.WebControls.ImageButton ImageButton52;
            protected System.Web.UI.WebControls.ImageButton ImageButton53;
            protected System.Web.UI.WebControls.ImageButton ImageButton54;
            protected System.Web.UI.WebControls.ImageButton ImageButton55;
            protected System.Web.UI.WebControls.ImageButton ImageButton56;
            protected System.Web.UI.WebControls.ImageButton ImageButton57;
            protected System.Web.UI.WebControls.ImageButton ImageButton58;
            protected System.Web.UI.WebControls.ImageButton ImageButton59;
            protected System.Web.UI.WebControls.ImageButton ImageButton60;
            protected System.Web.UI.WebControls.ImageButton ImageButton61;
            protected System.Web.UI.WebControls.ImageButton ImageButton62;
            protected System.Web.UI.WebControls.ImageButton ImageButton63;
            protected System.Web.UI.WebControls.ImageButton ImageButton64;
            protected System.Web.UI.WebControls.ImageButton ImageButton65;
            protected System.Web.UI.WebControls.ImageButton ImageButton66;
            protected System.Web.UI.WebControls.ImageButton ImageButton67;
            protected System.Web.UI.WebControls.ImageButton ImageButton68;
            protected System.Web.UI.WebControls.ImageButton ImageButton69;
            protected System.Web.UI.WebControls.ImageButton ImageButton70;
            protected System.Web.UI.WebControls.ImageButton ImageButton71;
            protected System.Web.UI.WebControls.ImageButton ImageButton72;
            protected System.Web.UI.WebControls.ImageButton ImageButton73;
            protected System.Web.UI.WebControls.ImageButton ImageButton74;
            protected System.Web.UI.WebControls.ImageButton ImageButton75;
            protected System.Web.UI.WebControls.ImageButton ImageButton76;
            protected System.Web.UI.WebControls.ImageButton ImageButton77;
            protected System.Web.UI.WebControls.ImageButton ImageButton78;
            protected System.Web.UI.WebControls.ImageButton ImageButton79;
            protected System.Web.UI.WebControls.ImageButton ImageButton80;
            protected System.Web.UI.WebControls.ImageButton ImageButton81;
            protected System.Web.UI.WebControls.ImageButton ImageButton82;
            protected System.Web.UI.WebControls.ImageButton ImageButton83;
            protected System.Web.UI.WebControls.ImageButton ImageButton84;
            protected System.Web.UI.WebControls.ImageButton ImageButton85;
            protected System.Web.UI.WebControls.ImageButton ImageButton86;
            protected System.Web.UI.WebControls.ImageButton ImageButton87;
            protected System.Web.UI.WebControls.ImageButton ImageButton88;
            protected System.Web.UI.WebControls.ImageButton ImageButton89;
            protected System.Web.UI.WebControls.ImageButton ImageButton90;
            protected System.Web.UI.WebControls.ImageButton ImageButton91;
            protected System.Web.UI.WebControls.ImageButton ImageButton92;
            protected System.Web.UI.WebControls.ImageButton ImageButton93;
            protected System.Web.UI.WebControls.ImageButton ImageButton94;
            protected System.Web.UI.WebControls.ImageButton ImageButton95;
            protected System.Web.UI.WebControls.ImageButton ImageButton96;
            protected System.Web.UI.WebControls.ImageButton ImageButton97;
            protected System.Web.UI.WebControls.ImageButton ImageButton98;
            protected System.Web.UI.WebControls.ImageButton ImageButton99;
            protected System.Web.UI.WebControls.ImageButton ImageButton26;
            protected System.Web.UI.WebControls.ImageButton ImageButton27;
            protected System.Web.UI.WebControls.ImageButton ImageButton28;
            protected System.Web.UI.WebControls.Label Label1;
            protected System.Web.UI.WebControls.Label Label2;
            protected System.Web.UI.WebControls.Label Label3;
            protected System.Web.UI.WebControls.Label Label4;
            protected System.Web.UI.WebControls.Label Label5;

            private void Page_Load(object sender, System.EventArgs e)
            {
                  // Put user code to initialize the page here
            }

            #region Web Form Designer generated code
            override protected void OnInit(EventArgs e)
            {
                  //
                  // CODEGEN: This call is required by the ASP.NET Web Form Designer.
                  //
                  InitializeComponent();
                  base.OnInit(e);
            }
            
            /// <summary>
            /// Required method for Designer support - do not modify
            /// the contents of this method with the code editor.
            /// </summary>
            private void InitializeComponent()
            {    
                  this.ImageButton_R1C1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton_R1C1_Click);
                  this.Load += new System.EventHandler(this.Page_Load);

            }
            #endregion


            private void ImageButton_R1C1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
            {
                  this.Label1.Text = this.ImageButton_R1C1.ImageUrl.ToString();
                  this.Label2.Text = this.ImageButton_R1C1.UniqueID.ToString();
                  this.Label3.Text = this.ImageButton_R1C1.ID.ToString();
                  this.Label4.Text = this.ImageButton_R1C1.NamingContainer.ToString();
            }


      }
}



=====  HTML SOURCE ==========


<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="NewRobotzGame.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
      <HEAD>
            <title>WebForm1</title>
            <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
            <meta content="C#" name="CODE_LANGUAGE">
            <meta content="JavaScript" name="vs_defaultClientScript">
            <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
      </HEAD>
      <body MS_POSITIONING="GridLayout">
            <form id="Form1" method="post" runat="server">
                  <TABLE id="Table1" style="Z-INDEX: 101; LEFT: 216px; WIDTH: 37px; POSITION: absolute; TOP: 178px; HEIGHT: 20px" cellSpacing="0" cellPadding="0" width="37" border="0">
                        <TR>
                              <TD style="WIDTH: 27px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton_R1C1" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\special.bmp"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton_R1C2" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton2" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton3" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton4" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton23" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton27" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton26" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton28" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px; HEIGHT: 15px">
                                    <asp:ImageButton id="ImageButton24" runat="server" Width="2px" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton>
                                    <asp:ImageButton id="ImageButton29" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg" ImageAlign="Middle"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton9" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton10" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton11" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton13" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton5" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton55" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton64" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton73" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton82" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px; HEIGHT: 10px">
                                    <asp:ImageButton id="ImageButton91" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton17" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton12" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton14" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton15" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton6" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton56" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton65" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton74" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton83" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px; HEIGHT: 8px">
                                    <asp:ImageButton id="ImageButton92" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton18" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton19" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton20" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton21" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton7" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton57" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton66" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton75" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton84" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton93" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton22" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton30" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton38" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton44" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton8" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton58" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton67" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton76" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton85" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton94" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton31" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton1" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton39" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton45" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton50" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton59" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton68" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton77" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton86" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton95" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton32" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton16" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton40" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton46" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton51" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton60" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton69" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton78" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton87" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton96" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton34" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton25" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton41" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton47" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton52" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton61" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton70" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton79" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton88" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton97" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton35" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton33" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton42" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton48" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton53" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton62" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton71" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton80" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton89" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton98" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                        <TR>
                              <TD style="WIDTH: 27px">
                                    <asp:ImageButton id="ImageButton36" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton37" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 24px">
                                    <asp:ImageButton id="ImageButton43" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 12px">
                                    <asp:ImageButton id="ImageButton49" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 23px">
                                    <asp:ImageButton id="ImageButton54" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton63" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 34px">
                                    <asp:ImageButton id="ImageButton72" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 8px">
                                    <asp:ImageButton id="ImageButton81" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 15px">
                                    <asp:ImageButton id="ImageButton90" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                              <TD style="WIDTH: 5px">
                                    <asp:ImageButton id="ImageButton99" runat="server" ImageUrl="file:///C:\aspprogramming\NewRobotzGame\wall.jpg"></asp:ImageButton></TD>
                        </TR>
                  </TABLE>
                  <asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 608px; POSITION: absolute; TOP: 241px" runat="server">Label</asp:Label>
                  <asp:Label id="Label2" style="Z-INDEX: 103; LEFT: 608px; POSITION: absolute; TOP: 287px" runat="server">Label</asp:Label>
                  <asp:Label id="Label3" style="Z-INDEX: 104; LEFT: 608px; POSITION: absolute; TOP: 333px" runat="server">Label</asp:Label>
                  <asp:Label id="Label4" style="Z-INDEX: 105; LEFT: 608px; POSITION: absolute; TOP: 379px" runat="server">Label</asp:Label>
                  <asp:Label id="Label5" style="Z-INDEX: 106; LEFT: 586px; POSITION: absolute; TOP: 188px" runat="server" Width="61px" Height="29px" Font-Bold="True">Info</asp:Label>
            </form>
      </body>
</HTML>
0
Comment
Question by:knowlton
3 Comments
 
LVL 33

Accepted Solution

by:
raterus earned 200 total points
ID: 12174201
add a commandargument and/or a commandname to the imagebutton.  Then handle the "Command" event, not the Click event.  The arguments of the handler will allow you to get the commandargument set.

Also this would probably be much easier if you used a DataList or a Repeater, no need to declare all those imagebuttons like that.
0
 
LVL 15

Assisted Solution

by:praneetha
praneetha earned 150 total points
ID: 12174935
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 216px; WIDTH: 37px; POSITION: absolute; TOP: 178px; HEIGHT: 20px" cellSpacing="0" cellPadding="0" width="37" border="0">

you can make it runat=server and access it in teh code behind...
and loopthru...Table1.Rows..and see which imagebutton is placed...
0
 
LVL 15

Assisted Solution

by:Thogek
Thogek earned 150 total points
ID: 12181365
Are you trying to access the containing table cell object within the server-side ASP.NET code on PostBack?  (As opposed to on the client-side via JavaScript?)

If so, you'll first need to make all of your <td> elements runat="server" in order for them to be server-side objects (and thus server-side accessible) at all.  (Or just making the <table> runat="server" might be sufficient.)

Then, within your ImageButton's click event handler, try something like:

    // get reference to clicked ImageButton
    ImageButton ibSender = (ImageButton)sender;
    // get reference to clicked ImageButton's containing td element
    HtmlTableCell tdContainer = (HtmlTableCell)(ibSender.Parent);
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now