<% @ Page Language = "C #" %> <% @ import namespace = "system. Drawing" %> <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <SCRIPT runat = "server"> protected void imagebutton#click (Object sender, imageclickeventargs E) {response. write ("imagebutton1");} protected void page_load (Object sender, eventargs e) {// The HTML generated by imagebutton1 on the client Code // <Input type = "image" name = "imagebutton1" id = "imagebutton1" src = "" style = "border-width: 0px; "/> // Why does it respond to the mouse-clicked event, // I think it is back to form <input type = "image" name = "imagebutton1" id = "imagebutton1" src = "" style = "border-width: 0px; "/> // tag, <input type =" hidden "name =" _ eventvalidation "id =" _ eventvalidation "value = ".... ndgtx_yjgf "/> // This is the hidden domain, so it can respond to the working principle of the click event, which may contain the Click Event in imagebutton1, and the server code to be executed. // String name = request. Form ["_ eventvalidation"]; // If (name! = NULL) // {// response. write (name); //} protected void button#click (Object sender, eventargs e) {This. imagebutton1.alternatetext = "HEBEI quyang";} protected void button2_click (Object sender, eventargs e) {// The descriptionurl attribute is optional, it can enhance the accessibility of web browsers for text browsers. // It is mainly used for accessibility. IMG of HTML has a new longdesc attribute // only special browsers support this. imagebutton1.descriptionurl = "imagebuttondescription.htm";} protected void button3_click (Object sender, eventargs e) {This. imagebutton1.backcolor = system. drawing. color. aqua; this. imagebutton1.imageurl = "images/4_1_2_x.jpg";} protected void button4_click (Object sender, eventargs e) {This. imagebutton1.imagealign = imagealign. right ;} </SCRIPT> <HTML xmlns = "http://www.w3.org/1999/xhtml">