It sounds like you would like to use parameters to me... When you import a package in the IIS inetmgr UI default parameters are created for each of the providers, which is why you get that prompt for the connection string. However you can also add explicit parameters when you create the package. If you're doing this with the msdeploy.exe cmd line, you can put the parameters in a file and then add a -declareParamFile: to your package command to add them. The parameter for the database would probably be something like this - this says to use the provided connection string for both the dbFullSql provider path and replace whatever's in the connectionStrings section of web.config:
<parameter name="ConnectionString" description="Connection string for my database" defaultValue="Data Source=.\SQLExpress;Initial Catalog=table;User Id=user;Password=pwd" >
<parameterEntry type="ProviderPath" scope="dbfullsql" match="Data\ Source=" />
<parameterEntry type="XmlFile" scope="\\web.config$" match="//connectionStrings/add/@connectionString" />
</parameter>
More parameter examples/resources here:
http://learn.iis.net/page.aspx/722/reference-for-the-web-application-package/ AND
http://technet.microsoft.com/en-us/library/dd569084(v=WS.10).aspx
If you have other Web Deploy questions please try our forum on IIS.net (http://forums.iis.net/1144.aspx).