http get请求参数问题

starskun888 2013-08-08 09:42:34
string uri = "http://api.189.cn/dm/api/auth/token.json?app_id=aaa&access_token=bbb×tamp=ccc&sign=ddd";

string app_id="123456";
如何把 uri内的参数app_id设置为一个变量,并赋值;
...全文
2873 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
CqCoder 2013-08-08
  • 打赏
  • 举报
回复

  string app_id = "123456";
            string uri = "http://api.189.cn/dm/api/auth/token.json?app_id=" + app_id + "&access_token=bbb×tamp=ccc&sign=ddd";
gomoku 2013-08-08
  • 打赏
  • 举报
回复
string uri = string.Format("http://api.189.cn/dm/api/auth/token.json?app_id={0}...", HttpUtility.UrlEncode(app_id));
  • 打赏
  • 举报
回复
String temp="hello"; app_id="+temp 这样?

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧