hi
i use this code for binding my dropdownlist from database
DDL1.Items.FindByValue(_dr["classification"].ToString()).Selected = true;
but this error occur
Server Error in '/behtop website' Application.
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 43: CKEditorControl1.Text = _dr["Description"].ToString();
Line 44: //DDL1.Items.FindByValue(_dr["classification"].ToString()).Selected = true;
Line 45: DDL2.Items.FindByValue(_dr["subset"].ToString()).Selected = true; Line 46:
|