topical media & game development
professional-xml-19-Listing-19-15.txt / txt
<%@ Page Language="C#" %>
<!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 Page_Load(object sender, EventArgs e)
{
AsyncTest.SlowBoy ws = new AsyncTest.SlowBoy();
IAsyncResult asyncCheck = ws.BeginTakeLongTime(null, null);
int x = 0;
while (asyncCheck.IsCompleted == false)
{
x += 1;
}
Label1.Text = x.ToString();
Label2.Text = ws.EndTakeLongTime(asyncCheck).ToString();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Asynchronous invocation</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />
<br />
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.