Quite simple really :)
- Open up an existing DVWP or create one.
- Right click the DVWP and select ‘Common Data View Tasks’ (or click the little arrow that appears on the top right of the DVWP)
- Click the ‘Parameters’ link
- In the dialog that opens up click the ‘New Parameter’ button.
- Provide a name for the parameter (e.g. IPAddress)
- In the ‘Parameter Source’ dropdown select ‘Server Variable’
- In the ‘Server Variable Name’ text box enter REMOTE_ADDR
- Leave the ‘Default Value’ text box empty
- Click OK
- Now switch to the code view and go to the place where you want the IPAddress to appear and type the following:
<xsl:value-of select="$IPAddress" />
Thats it! Save and open the page containing the DVWP and it should show you you’re IPAddress. I’ve only been able to test it on the intranet and it works fine. If you want to display values of other server variables you can add more parameters and provide the appropriate variable name.
Here’s a list of server variables: http://www.w3schools.com/asp/coll_servervariables.asp