Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hiii all
i have an image button that i draw with its data in the runtime and i want in the event og onclick of it, apopup model appears to confirm delete or update that row.
the problem is hereeeee that i made alot of searches but all i found was in the design time...
can any one help me , pleaseeeeeeeeeeee?
thanks
Posted

1 solution

C#
protected void Page_Load(object sender, EventArgs e)
{
    //create image button
    ImageButton myImageButton = new ImageButton();
    myImageButton.ImageUrl = "myPicture.png";

    //set the click event - this event will be fired when the user clicks the image button
    myImageButton.Click += new ImageClickEventHandler(myImageButton_Click);
}

void myImageButton_Click(object sender, ImageClickEventArgs e)
{
    //your image button was clicked.
}


Regarding the popup, are you doing it in javascript? If so, remember that the message box could only contain "OK" or "Cancel". You can do it through c# code by showing a div with the required question and respective buttons.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900