A
Aal D via .NET 247
Hi,
i have a search function on my page. first i allow user to select from the dropdown a price.On btn_click i estalish Sql Connection..then ..creat command..and then creat dataview.
dv.RowFilter = "Price=here i want to have the selected value" from the dropdown
i have named DropDown as ddlComnapy...so my code looks like..
dv.RowFilter = "Price=ddlCompany.SelectedValue"
but on running the program it says:System.Data.EvaluateException: Cannot find column ddlcompany.SelectedValue
but if i hardcode a value ,then the code works perfectly fine.
CAN SOME BODY PLEASE POINT OUT WHERE I AM GOING WRONG
..NET ROCKS!
Aal
i have a search function on my page. first i allow user to select from the dropdown a price.On btn_click i estalish Sql Connection..then ..creat command..and then creat dataview.
dv.RowFilter = "Price=here i want to have the selected value" from the dropdown
i have named DropDown as ddlComnapy...so my code looks like..
dv.RowFilter = "Price=ddlCompany.SelectedValue"
but on running the program it says:System.Data.EvaluateException: Cannot find column ddlcompany.SelectedValue
but if i hardcode a value ,then the code works perfectly fine.
CAN SOME BODY PLEASE POINT OUT WHERE I AM GOING WRONG
..NET ROCKS!
Aal