How to change the visibility of image button in asp.net?

Discussion in 'C#' started by raspms, Apr 17, 2012.

  1. #1
    hello,
    i have two image button on girdview for display the status.
    i want to change the visibility of that image button means if the status is true then i watn to make it false by clicking on that.
    means if i clicked on green(suppose true) then red(false) button should be apper.
    how can i do this..give me source code for that...
     
    raspms, Apr 17, 2012 IP
  2. geekstrack

    geekstrack Well-Known Member

    Messages:
    72
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #2
    protected void button_click(object sender, EventArgs e){
    ImageButton ibtn1 = sender as ImageButton;
    int rowIndex = Convert.ToInt32(ibtn1.Attributes["RowIndex"]);

    //Use this rowIndex in your codeon button click of image do something like this...For More .net Tutorials Visit Here
     
    geekstrack, Apr 22, 2012 IP