I'm using asp.net 4 ,C# ,VS 2010. I'm facing a problem by calling a web service method which has a WebControl as a parameter.
/// <summary>
/// Summary description for FormsViews
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class FormViews : System.Web.Services.WebService
{
[WebMethod]
public void SetCaption(System.Web.UI.WebControls.Button bt)
{
//Code...
}
}
It compiles with no errors. On RunTime I get this message:
The XML element 'EnableTheming' from namespace 'namespace' is already present in the current scope. Use XML attributes to specify another XML name or namespace for the element.
Can you please explain why the webService doesn't accept a WebControl and how to handle this issue?