|
August 18, 2002 Linking Code Behind to the IsPrime Web Service Consumer Tips: August 2002
Yehuda Shiran, Ph.D.
|
|
We showed you in Column 114 how to consume the IsPrime Web service from an ASP.NET page. Let's now split the presentation from the business logic by putting the JScript .NET code in a separate Code Behind file. Here is the page for consuming the IsPrime Web service, IsPrimeConsumerForm.aspx:
We have three controls. The first ASP:TextBox control serves for inputting the number to be tested. We use the resultControl ASP:Label to display the result of the check, "is not a prime number" or "is a prime number". The last control is the isprime ASP:Button. When clicked, the function Submit_Click() is called from the Code Behind.To learn more about JScript .NET and ASP.NET, go to Column 115, JScript .NET, Part IX: Code Behind.
People who read this tip also read these tips: Look for similar tips by subject: |