Missing parameter in web service C#
<p>I am creating a web service in C#:</p>

<pre><code>[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public void upd(string id, string upddate,string pm)
{
    SqlCommand cmd = new SqlCommand("updcsuv", con);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Connection = con;

    SqlParameter[] param =
    {
        new SqlParameter("@id",id),
        new SqlParameter("@upddate",upddate),
        new SqlParameter("@username",pm)

    };
    cmd.Parameters.AddRange(param);
    con.Open();
    cmd.ExecuteNonQuery();
    con.Close();
}
</code></pre>

<p>and the stored procedure for the web service is</p>

<pre><code>CREATE proc updcsuv             
    (@id int,              
     @upddate datetime,              
     @username varchar(30))              
as              
begin            
    update csuv              
    set date = @upddate,              
        UserName = @username,
    where 
        id = @id              
end 
</code></pre>

<p>I am getting the error in my web service and I don't understand why the error is happening as I think my web service is correct and I passed all the parameters correctly </p>

<p>This is the error </p>

<blockquote>
  <p>System.InvalidOperationException: Missing parameter: upddate.<br>
  at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection)<br>
  at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request)<br>
  at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()<br>
  at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</p>
</blockquote>