Dataset return type

Oct 26 2010 5:21 AM

Hi all expert,

How to give message in method type dataset in web service. In else part of if I want to give some message like "Access is denied ". Here is my code. Pls help me.

[WebMethod, SoapHeader("spAuthenticationHeader")]   

    public DataSet GetCustList()

    {        

        if (spAuthenticationHeader.strUserName == "TestUser" && spAuthenticationHeader.strPassword == "TestPassword")

        {

            DataSet ds = new DataSet();

            CustomerDAL Customer = new CustomerDAL();

            return Customer.GetCustomer();

        }

        else

        {

            //string mymessage = "Access is Denied";           

            //DataSet ds1 = new DataSet();            

            Here i want to give message like ""Access is Denied";            

        }

       

    }



Answers (3)