How to store a URL in config where just a part of it is variable

Ex: “www.MyWebsite/”+MyVariable+“/”

How to make use of Config or Assets for the above ?


You should store the URL like this:
MyAsset = "www.MyWebsite/{0}/"
So when you go to use this, do:
MyURL = String.Format(MyAsset, MyVariable)

1 Like

Thank you so much,it worked and if there are multiple variables, I assume it is something similar, but can explain how ?

you mean if you wanted several variables could be like this:
MyAsset = "www.MyWebsite/{0}/{1}/{2}"

MyURL = String.Format(MyAsset, MyVariable,MyVariable2,MyVariable3)

1 Like

Awesome. :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.