【发布时间】:2012-09-24 19:05:42
【问题描述】:
http://www.test.com/test.aspx?testinfo=&|&
我正在尝试用表中的值替换 &。我将姓名和年龄作为两个参数,我需要替换并获得这样的网址:
http://www.test.com/test.aspx?testinfo=name|age
如果我有 3 个字符串参数要替换为 url:
http://www.test.com/test.aspx?testinfo=&|&
上述网址的姓名、年龄、地址:
http://www.test.com/test.aspx?testinfo=name|age|address
string URL=string.Empty;
URL=http://www.test.com/test.aspx?testinfo=&|&;
//in this case fieldsCount is 2, ie. name and age
for(int i=0; i<fieldsCount.Length-1;i++)
{
URL.Replace("*","name");
}
如何添加“年龄”以便得到?任何输入都会有所帮助。
http://www.test.com/test.aspx?testinfo=name|age
【问题讨论】:
-
这个帖子不是很清楚。您可以尝试编辑您的帖子吗?