How to replace url-parameter?

后端 未结 8 762
谎友^
谎友^ 2021-01-12 01:27

given is an URL like http://localhost:1973/Services.aspx?idProject=10&idService=14.

What is the most straightforward way to replace both url-paramet

8条回答
  •  -上瘾入骨i
    2021-01-12 01:48

    The most straightforward way is String.Replace, but you'll end up with problems if your uri looks like http://localhost:1212/base.axd?id=12&otherId=12

提交回复
热议问题