HowTo: Create a dynamic hyperlink in an XML data view

Inside the Data View Web Part, hyperlinks can be populated with data from the data source. Doing so is really easy, but is unfortunately a little bit difficult to discover. 

1. Insert a Data View Web Part based on your data source
2. Select any of the data values displayed in the Data View
3. Choose Insert
4. Choose Hyperlink
5. Click on Parameters

Now you can write out the URL and append parameters (like foo.aspx?bar={@baz}).

-John

Comments

  • Anonymous
    May 05, 2004
    This is a useful piece but could and should have been a blog item (saving everyone a click and wait to load this page).
  • Anonymous
    July 26, 2004
    this gives me a compilor error with tomcat 5.0. The variable i need to access is turned to lower case thus not found!
    any other idea how to make that happen?
  • Anonymous
    August 01, 2004
    Thanks for this tip, but do you know how I can show the doc icon into my dataview?

    In the dataview, I found only the doc type like PDF but nothing about the icon, any idea!