P
Paul
Hi, I have a dropdown box bound to a data object. In the code below I am
trying to bind this dropdown box to a different dataobject called
ObjDtaSceSystemBySystemType but get the error (Target invocation exception)
when I try to bind the dropdown box to the new dataobject. Any IDEAS!
ObjDtaSceSystemBySystemType.SelectParameters["SystemTypeID"].DefaultValue =
Convert.ToString(drdwnSystemtype.SelectedValue);
ObjDtaSceSystemBySystemType.DataBind();
drdwnSystem.Items.Clear();
drdwnSystem.DataSourceID = "ObjDtaSceSystemBySystemType";
drdwnSystem.DataBind();
Below is the detailed error information.
System.Reflection.TargetInvocationException was unhandled by user code
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target,
Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target,
Object[] arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture)
at
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
at
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.ListControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at InspectionsNew.drdwnSystemtype_SelectedIndexChanged(Object sender,
EventArgs e) in
c:\Inetpub\wwwroot\ALLQSISREALDATA\SQSIS\frmInspectionsNew.aspx.cs:line 235
at
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
at System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent()
at
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
trying to bind this dropdown box to a different dataobject called
ObjDtaSceSystemBySystemType but get the error (Target invocation exception)
when I try to bind the dropdown box to the new dataobject. Any IDEAS!
ObjDtaSceSystemBySystemType.SelectParameters["SystemTypeID"].DefaultValue =
Convert.ToString(drdwnSystemtype.SelectedValue);
ObjDtaSceSystemBySystemType.DataBind();
drdwnSystem.Items.Clear();
drdwnSystem.DataSourceID = "ObjDtaSceSystemBySystemType";
drdwnSystem.DataBind();
Below is the detailed error information.
System.Reflection.TargetInvocationException was unhandled by user code
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle._InvokeMethodFast(Object target,
Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target,
Object[] arguments, Signature sig, MethodAttributes methodAttributes,
RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo
culture)
at
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
at
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)
at System.Web.UI.WebControls.ListControl.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
at InspectionsNew.drdwnSystemtype_SelectedIndexChanged(Object sender,
EventArgs e) in
c:\Inetpub\wwwroot\ALLQSISREALDATA\SQSIS\frmInspectionsNew.aspx.cs:line 235
at
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
at System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent()
at
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
at System.Web.UI.Page.RaiseChangedEvents()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)