15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

What is ajax ❘ 1225<br />

<br />

<br />

<br />

Panel render time: <br />

<br />

<br />

<br />

<br />

<br />

Updating.<br />

<br />

<br />

Page render time: <br />

<br />

<br />

<br />

<br />

code snippet PCSAjaxWebSite1/Default.aspx<br />

Switch to design view (note that the ASP.<strong>NET</strong> AJAX controls such as UpdatePanel <strong>and</strong> UpdateProgress<br />

have visual designer components), <strong>and</strong> double-click the Calculate button to add an event h<strong>and</strong>ler. Modify<br />

the code as follows:<br />

protected void GoButton_Click(object sender, EventArgs e)<br />

{<br />

int maxValue = 0;<br />

System.Text.StringBuilder resultText = new System.Text.StringBuilder();<br />

if (int.TryParse(MaxValue.Text, out maxValue))<br />

{<br />

for (int trial = 2; trial

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!