# Passing a variable value to my web.config

**URL:** https://www.finalbuilder.com/forums/t/passing-a-variable-value-to-my-web-config/4999
**Category:** Discussion
**Created:** [June 25, 2013, 9:17am UTC](https://www.finalbuilder.com/forums/t/passing-a-variable-value-to-my-web-config/4999 "2013-06-25T09:17:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lalit](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/l/bbe5ce/32.png) [@lalit](https://www.finalbuilder.com/forums/u/lalit)
#### Post date: [June 25, 2013, 9:17am UTC](https://www.finalbuilder.com/forums/t/passing-a-variable-value-to-my-web-config/4999/1 "2013-06-25T09:17:25Z")

</div>

Hi,

how to pass/poke a variable to my webconfig.

ex: After MSbuild i would like to pass the revision or changeset to my web.config, so that my application can read it from the web.config and display it on the application page.

---

<div class="post-metadata">

### Author: ![davem](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/67e7ee/32.png) [@davem](https://www.finalbuilder.com/forums/u/davem)
#### Post date: [June 26, 2013, 2:28am UTC](https://www.finalbuilder.com/forums/t/passing-a-variable-value-to-my-web-config/4999/2 "2013-06-26T02:28:57Z")

</div>

You have two options for updating a value in web.config file

  

1. If you have FinalBuilder, it includes several xml actions that you can use to change the correct value in the web.config file. You can create a FinalBuilder script that is solely responsible for updating the correct value in the web.config file.

2. Use the powershell action to change the selected value in the web.config. Create a powershell script that takes a parameter (ie. the revision number) and injects it into your web.config. For the powershell action, the Script arguments should look something like this: myRevisionNo=%myRevisionNo%

Check out this page for more information regarding injecting values into web.configs

[http://archive.arcware.net/2008/12/...owershell/](http://archive.arcware.net/2008/12/11/modifying-web-config-with-powershell/)
