Home > DotNetnuke > Cascading Dropdown in DotNetNuke

Cascading Dropdown in DotNetNuke

I am newbie in DNN. Below is how to set cascading dropdown in DNN using XModPro (Module  from http://www.dnndev.com) , that I got from http://www.lobag.ch/DesktopModules/XModPro/help/form_dropdownlist.html . In addition I add AppendDataBoundItems (just like in ASP.Net DropdownList control), here it is :

<SubmitCommand CommandText=”INSERT INTO Contacts(ContactName,Country,Region)
VALUES(@ContactName,@Country,@Region)” />
<ControlDataSource id=”dsCountries”
CommandText=”SELECT Text, EntryID FROM Lists WHERE ListName=’Country’ ORDER BY Text”/>
<ControlDataSource id=”dsRegions”
CommandText=”SELECT Text, Value FROM Lists WHERE ParentID=@ParentID”>
<Parameter name=”ParentID” />

<Label for=”ddlCountries” text=”Country” />
<DropdownList id=”ddlCountries” DataField=”Country” DataType=”string”
DataTextField=”Text” DataValueField=”EntryID” DataSourceId=”dsCountries”
TargetDataSourceId=”dsRegions” ParameterName=”ParentID” TargetControlId=”ddlRegions” AppendDataBoundItems=”True” ><ListItem Value=”” selected=”true”>Please Choose</ListItem></DropDownList>

<Label for=”ddlRegions” text=”Region” />
<DropdownList id=”ddlRegions” DataField=”Region” DataType=”string”
DataTextField=”Text” DataValueField=”Value” DataSourceId=”dsRegions” AppendDataBoundItems=”True” ><ListItem Value=”” selected=”true”>Please Choose</ListItem></DropDownList>

<AddButton text=”Add” /> &nbsp;<CancelButton text=”Cancel” />


Categories: DotNetnuke Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: