i have never found this Answer that how to pass multiple parameters of stored procedure which stroed procedure inside a sharead or static method
i have webservice that need to be as a shared or static method
[WebMethod(EnableSession = true)]
public static SearchParameters[] Select_Search()
{
List<SearchParameters> JSON = new List<SearchParameters>();
DataTable dtst = new DataTable();
dsStockTableAdapters.newSTOCK_LISTTableAdapter List = new dsStockTableAdapters.newSTOCK_LISTTableAdapter();
string theMake = HttpContext.Current.Session("SelectedMakeValue").ToString();
dtst = List.GetData(theMake, "0", "0", "0", "0", DisplayType, "", "", "", "Any",
"", "", "", "", "", 0, "", "", 0, "");
try {
foreach (DataRow rdr in dtst.Rows) {
SearchParameters SRCH = new SearchParameters();
SRCH.CHASSIS_NO = rdr["CHASSIS_NO"].ToString();
SRCH.MODEL = rdr["MODEL"].ToString();
SRCH.color = rdr["color"].ToString();
SRCH.TRANSMISSION = rdr["TRANSMISSION"].ToString();
SRCH.DOOR = rdr["DOOR"].ToString();
SRCH.MAKE = rdr["MAKE"].ToString();
SRCH.Image1 = rdr["Image1"].ToString();
SRCH.MODEL_DESCRIPTION = rdr["MODEL_DESCRIPTION"].ToString();
JSON.Add(SRCH);
}
} catch {
}
return JSON.ToArray();
}
i want to pass values from different dropdownlist and from textboxes to this stroed procedure below
dtst = List.GetData(theMake, "0", "0", "0", "0", DisplayType, "", "", "", "Any",
"", "", "", "", "", 0, "", "", 0, "");
something like this
dtst = List.GetData(DropdownList1.SelectedValue, DropDownList2.SelectedValue, DropDownList3.SelectedValue, DropDownList4.SelectedValue, DropDownList5.SelectedValue, DropDownList6.SelectedValue, DropDownList7.SelectedValue, TextBox1.Text, TexBox2.Text);
i have done each and every thing which i could for exmaple i have created property, i used session but with no luck
Simple to listen but hard to implement that how to use control values into shared or static method? is there any easy way from miscrosoft to do this?