how can i recognize the which button is clicked?

1 posts, 0 answers
  1. Kapil
    Kapil avatar
    15 posts
    Member since:
    Jul 2010

    Posted 03 Apr 2012 Link to this post

    Hello,

    i have added multiple link buttons in each calendar cell. As we know we can't create click events for the added link button while rendering calendar.i have written code like below:

     foreach (var lstCurrentDayWorkOrder in lstCurrentDayWorkOrders)
                {
                    var trOfInnerTable = new TableRow();
                    innerTableOfWorkOrderRow.Rows.Add(trOfInnerTable);
                    var tdForInnerRow = new TableCell();
                    trOfInnerTable.Cells.Add(tdForInnerRow);

                    var workOrderLink = new LinkButton { Text = "#" + lstCurrentDayWorkOrder.pm_strWorkOrderNum };
                    workOrderLink.Attributes.Add("href", "javascript:void(0);");
                    workOrderLink.Style["color"] = "blue";

                    tdForInnerRow.Controls.Add(workOrderLink);
                }

    Regards,
    Kapil Garg
    Software Engg.
Back to Top