I have no idea what kind of issue do you have... You did provide enough information about your needs. Now, you need to start coding. That's all.
Please see:
Connection Strings and Configuration Files[
^]. It might help you.
[EDIT]
Quote:
problem is that now my connection string is not fixed and we need to change datasource initial catalog based on xml file which is separate from Web config file. how to update web config file connection string based on that xml file.
The simplest way i can imagine is:
1)
create[
^]
DataTable[
^] object
2) add
columns[
^] and
rows[
^] (data)
3)
save DataTable data to Xml file[
^]
That's all! ;)
Tip: to get data from xml, use
DataTable,ReadXml method[
^]
There is many other ways to achieve that, for example using XML DOM document, XMLWriter, etc.
[/EDIT]