To use dynamic data, you will need to add the map to a dynamic file type.
if the page you are adding the map to has the extension .html it is a static page that does not allow dynamic data. your page must have a dynamic extension like .php.
you will also need to have your Dreamweaver site configured for dynamic development.
see the "Defining a Dynamic Site in Dreamweaver" tutorial on the learning resources page:
resources.php