i have about 20 dropdowns to be filled in a page and got about 12 diff pages in which i need to fill the same way.
so just to cut short the code
i created a class as below. this class is placed under the app_code and i am trying to call the below class from my code page as PropertyMax.fnFillDropdown(ddlArea, "spGetArea", "AreaId", "Area", "Select Area");
it shows a red line and is not working. any help would be greatly appreciated.
public class PropertyMax
public static void fnFillDropdown(DropDownList ddl, string spName, string dbFieldId, string dbFieldName, string DefaultSelText)
SqlConnection sqlConn = new SqlConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["PMDb"].ToString());
SqlCommand sqlCmd = new SqlCommand(spName, sqlConn);
sqlCmd.CommandType = CommandType.StoredProcedure;