Hey everyone,

First of all I am a one-week self taught when it comes to web service so pardon if this is a duh! question. I was given a sample Web Service and aske dto re-create it a new one from scratch. I have been able to understand and apply several of the elments from the original Web Service but I ran into a wall with one. The Web Service has the following element

    <s:element name="runQAAS">
        <s:complexType>
            <s:sequence>
                <s:element name="login" type="s:string"/>
                <s:element name="password" type="s:string"/>
                <s:element name="createdBy" type="s:dateTime" nillable="true"/>
                <s:element name="createdTo" type="s:dateTime" nillable="true"/>
                <s:element name="modifiedBy" type="s:dateTime" nillable="true"/>
                <s:element name="modifiedTo" type="s:dateTime" nillable="true"/>
            </s:sequence>
        </s:complexType>
    </s:element>

The user will enter a username and a password given to him/her. The problem is I am not certain how to create a Web Method to ask for the username and password, and how to add the entries for username and password to my asmx file. Just so you know I am using Visual Studio 2010 and programing in C#. Any help will be greatly appreciated. Thank you guys.

Just add a method that takes those parameters.

I'll move this to the ASP.NET forum. Is more active.

Actually that is where I am having the problem, I am not sure how to create the method. Thank you for moving the post.

Just add it to the ASMX file.

I don't know what I need to add to the ASMX file.

[WebMethod]
public static Result GetGridData(string login, string password)
{
   //Your code here
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.