hi
I have dropdown list in edit.aspx page and bind it from database
when page is run in DDLtype shows data that save in Estate_p table in Type column
ddltype.Items.FindByText(_dr["Type"].ToString()).Selected = true;
and I have one button==>btnEdit that when I click on this button it update estate_p table and save Items that I change in my page like DDltype
and I have other button--> btnmanager in my page that when I click on this button it redirect to other page(manager.aspx)
Now problem is when I run page in ddltype shows i.e ='Home' (this data saved in Estate_p table and now shows in ddltype)
now when I change ddltype Item to i.e =='apartment' and didn't click on btnEdit(this mean I don't want save changs in database) I just change ddltype item and when I click on btnmanager that redirect to other page below error happen
Procedure or function 'selecttransfer' expects parameter '@Type', which was not supplied.
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.Data.SqlClient.SqlException: Procedure or function 'selecttransfer' expects parameter '@Type', which was not supplied.
Source Error:
Line 517:
Line 518: _cn.Open();
Line 519: ddlTranE.DataSource = _cmd.ExecuteReader();
Line 520: ddlTranE.DataTextField = "Transfer";
Line 521: //ddldistric1.DataValueField = "ID";
I know this happen becuse in database saved 'home' in type column and when I change ddltype item to 'apartment' and don't save it this error happen
but I don't know how I can solve this problem
Best regards
neda