"/>
Listing 8-10. The Confirm Web Form Code-Behind Class File
using System;
namespace ControlsBook2Web.Ch08
{
public partial class Confirm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button_Click(object sender, System.EventArgs e)
{
status.Text = "Regular Button Clicked! - " + DateTime.Now;
}
protected void LinkButton_Click(object sender, System.EventArgs e)
{
status.Text = "LinkButton Clicked! - " + DateTime.Now;
}
374 CHAPTER 8 ?– I NTEGRAT ING CLI ENT-SI D E SCRIPT
protected void ConfirmLinkButton_ClickClick(object sender, System.EventArgs e)
{
status.Text = "ConfirmLinkButton Clicked! - " + DateTime.Now;
}
protected void Button2_Click(object sender, EventArgs e)
{
status.Text = "Click a button.";
}
}
}
So far in this chapter, we have covered how to integrate client-side script in general, how
to execute client script on page load, and how to execute client script during form submission
or as part of navigation. In the next section, we explore how to integrate client- and server-side
events to provide graceful degradation if client-side script support is not available.
Integrating Client-Side and Server-Side Events
The event processing that occurs in the client browser is separate from the ASP.
Pages:
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490