johnt68 0 Junior Poster in Training

Hello

I keep getting the error below. I have been googling all night and still cannot find the answer and so would appreciate any help.

I have a grid view attached to a drop down list called "ddl1" through object data sources.

"title" is the string that I am passing in the following web method.

[WebMethod]//METHOD TO SHOW VACANCIES BY TITLE (For Gridview)

    public DataSet1.tblJobDataTable GetDataByJobTitle(string title)
    {
        DataSet1TableAdapters.tblJobTableAdapter ta1 = new DataSet1TableAdapters.tblJobTableAdapter();
        return ta1.GetDataByJobTitle(title);
    }

The error that I get is as follows ...


Could not find control 'ddl1titles' in ControlParameter 'title'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Could not find control 'ddl1titles' in ControlParameter 'title'.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: Could not find control 'ddl1titles' in ControlParameter 'title'.]
System.Web.UI.WebControls.ControlParameter.Evaluate(HttpContext context, Control control) +2107262
System.Web.UI.WebControls.Parameter.UpdateValue(HttpContext context, Control control) +50
System.Web.UI.WebControls.ParameterCollection.UpdateValues(HttpContext context, Control control) +113
System.Web.UI.WebControls.ObjectDataSource.LoadCompleteEventHandler(Object sender, EventArgs e) +46
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.OnLoadComplete(EventArgs e) +9009874
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2350

Be a part of the DaniWeb community

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