I have a Static Method that is
[System.Web.Script.Services.ScriptMethod()]
[System.Web.Services.WebMethod]
public static List<string> GetWorkPackages(string prefixText)
{
DataTable dt = getWorkpackages(ddlWp.SelectedValue);
List<string> wps = new List<string>();
for (int i = 0; i < dt.Rows.Count; i++)
{
wps.Add(dt.Rows[i][1].ToString());
}
return wps;
}
Here Error Occured at ddlWp.SelectedValue(The name 'ddlWp' doesn't exist in the current context )
ddlWp is my asp control dropdownlist
How can I pass my dropdown in static method ?