Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IE displays a blank page

0 views
Skip to first unread message

Rick

unread,
Mar 17, 2010, 4:54:01 PM3/17/10
to
I've created a very simple web service (copied from a site); it displays a
blank page.
How do I fix it?

using System;
using System.Web.Services;

public struct SecurityInfo
{
public string Code;
public string CompanyName;
public double Price;
}

public class SecurityWebService : WebService
{
private SecurityInfo Security;

public SecurityWebService()
{
Security.Code = "";
Security.CompanyName = "";
Security.Price = 0;
}

private void AssignValues(string Code)
{
Security.Code = Code;
Security.CompanyName = Code + " Pty Ltd";
Random RandomNumber = new System.Random();
Security.Price = double.Parse(new System.Random(RandomNumber.Next(1,
10)).NextDouble().ToString("##.##"));
}


[WebMethod(Description = "This method call will get the company name and
the price for a given security code.", EnableSession = false)]
public SecurityInfo GetSecurityInfo(string Code)
{
AssignValues(Code);
SecurityInfo SecurityDetails = new SecurityInfo();
SecurityDetails.Code = Security.Code;
SecurityDetails.CompanyName = Security.CompanyName;
SecurityDetails.Price = Security.Price;
return SecurityDetails;
}

}

0 new messages