Prev | Current Page 467 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

gif" OverImageUrl="ex1_selected.gif"
NavigateUrl="http://www.apress.com" />
OverImageUrl="ex2_selected.gif"
NavigateUrl="http://asp.net" EnableClientScript="True" />


Listing 8-6. The RolloverImage Web Form Code-Behind Class File
using System;
namespace ControlsBook2Web.Ch08
{
public partial class RolloverImage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
CHAPTER 8 ?–  INTEGRATING CL IENT-SIDE SCRIPT 365
Analyzing the Rollover HTML Output
The rollover functionality lives in the emitted hyperlink tags in the HTML output. The top of
the HTML form also contains the image-swapping function called by the onmouseover and
onmouseout client event handlers attached to the hyperlinks, as shown here:

The Image control output shows the tags wrapped by an tag and the client-script
event mappings for onmouseover and onmouseout:
onmouseover="__Image_Swap('ctl00$ControlsBookContent$image1',
'/ControlsBook2Web/Ch08/ex1_selected.


Pages:
455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479