且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用逗号网址中两个值之间用逗号查询字符串

更新时间:2022-12-11 08:41:03

1.The values 43,46 将被解释为单个值: 43,56 ;



2.如果您想为数组传递两个值,您可以使用:

www.example.com/default .aspx?Id = 43& Id = 56

但是你调用的网站后面的代码应该会得到一个int值数组。



3.如果你想传递Id和ComanyId这两个值,你必须建立一个类似下一个的URL:

www.example的.com / Default.aspx的编号= 43&安培; CompanyId = 56

Hi,
I have to pass values in query string in a conformation mail.

www.example.com/default.aspx?Id=43,56

I am using 3rd party mail severs.

It is possible to pass values in this way,
This is correct or not? because I am not getting any mails in this way.

www.example.com/default.aspx?Id=43
In this way I got mails.
Please suggest me.
Thank you.

1.The values 43,56 that you want to pass will be interpreted as a single value: "43,56";

2.If you want to pass two values for an array you could use:
www.example.com/default.aspx?Id=43&Id=56
but your code behind from the invoked site should expect to got an array of int values.

3.If you want to pass two values like Id and ComanyId you have to build a URL like the next one:
www.example.com/default.aspx?Id=43&CompanyId=56