Populating a drop-down list from a stored procedure

In this recipe we will see how to populate a drop-down list from a stored procedure. This is similar to binding to a DNN list, but now we can use any data stored in the database for the list.

Getting ready

To follow along with this recipe you must have completed the following recipes:

  • Creating stored procedures (from Chapter 4)
  • Populating a drop-down list from a DNN list

How to do it...

  1. Start by launching the Development Tool and loading the Employee project.
  2. Double-click to open the ViewEmployee.ascx file.
  3. Find the table and the salary control you added from the previous recipe. Look for the two placeholders and replace them with this label and control code so the HTML table now looks like this:
    <table ...

Get DotNetNuke 5.4 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.