I have a form which is going to be used so the end-user selects two drop-down lists and then these selections are used for exporting information via a feed.
Originally, the top control data source didn't have the convert; it should be a normal int for the disasterID.
So for the first drop-down list, I had the DataType=int, but this failed. If I change this to int32, I get the same error as below.
When I tried the convert with the datatype to string, it errors out with the same error.
Why is this occurring?!
Here are my Control Data Sources:
<ControlDataSource id="CDS_InActiveDisasters" CommandText="Select CONVERT(nvarchar(3), disasterID) as DisasterName, disastertype + ' (' + convert(varchar, disasterID) + ') - ' + REPLACE(REPLACE([emergency],0,'Drill'), 1,'Emergency') as Type FROM [disaster] where active=0 and newevent=0 order by disasterID" >
</ControlDataSource>
<ControlDataSource id="CDS_PersonalLogs" CommandText="Select Distinct Username from personallogs where DisasterName = @DisasterName" >
<Parameter name="@DisasterName" />
</ControlDataSource>
Here is my Drop Down Lists:
<DropdownList id="DDL_InActiveDisasters" DataField="disasterID" DataType="string" DataTextField="Type" DataValueField="Type" DataSourceId="CDS_InActiveDisasters" AppendDataBoundItems="True" TargetDataSourceId="CDS_PersonalLogs" ParameterName="DisasterName" TargetControlId="DDL_PersonalLogs" >
<ListItem Value="0" selected="true">
Select In-Active Disaster
</ListItem>
</DropdownList>
<DropdownList id="DDL_PersonalLogs" DataField="Username" DataType="string" DataTextField="Username" DataValueField="Username" DataSourceId="CDS_PersonalLogs" AppendDataBoundItems="True">
<ListItem Value="-1" selected="true">
Select Personal Logs
</ListItem>
</DropdownList>
DNN Event Log Error:
UserAgent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36
DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
ExceptionGUID:9660def9-679d-48b0-bb24-7c9bbcf26441
InnerException:Object reference not set to an instance of an object.
FileName:
FileLineNumber:0
FileColumnNumber:0
Method:KnowBetter.XModPro.Web.Controls.Form.DropDownList.ValueChanged
StackTrace:
Message:
DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at KnowBetter.XModPro.Web.Controls.Form.DropDownList.ValueChanged()
at KnowBetter.XModPro.Web.Controls.Form.DropDownList.SetValue(Object BoundValue)
at KnowBetter.XModPro.Web.Controls.Form.FormBase.SetControlValues(XItem xi)
at KnowBetter.XModPro.Web.Controls.Form.FormView.SetControlValues(XItem xi)
at KnowBetter.XModPro.XMPFormView.LoadForm(FormView frm, List`1 lstParamIn)
at KnowBetter.XModPro.XMPFormView.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--- End of inner exception stack trace ---