[英]How to pass parameter between two project asp.net
I have C# page to send parameters to an webservice and the webservice is not in the same project. 我有C#页可以将参数发送到Web服务,并且该Web服务不在同一项目中。 I know the url of the webservice.
我知道网络服务的网址。 How can I pass the parameters, I've tried the code below
我如何传递参数,我已经尝试过下面的代码
Response.Redirect(" http://url/mobileservice.asmx/kioskOyunKodu?kioskkod='+kioskID+',kioskKodEncryped='+encodedCode+',okulno='+txt_StudentID.Text'");
Is there any other way to solve this issue when I execute that line I got 当我执行该行时,还有其他方法可以解决此问题吗
A potentially dangerous Request.Path value was detected from the client (:).
从客户端(:)检测到潜在的危险Request.Path值。
There is a space for creativity for this particular case: 在这种特殊情况下,有创造力的空间:
GET
request GET
请求中传递带有特殊字符的参数 ID
and then you can pass the id as a parameter between your service url ID
的单个表中,然后可以在服务URL之间将ID作为参数传递 POST
reqest with data POST
请求 You Url is wrongly formed and you have included special character in your redirect URL. 您的网址格式错误,并且您在重定向URL中包含特殊字符。 That why you received A potentially dangerous Request.Path value was detected from the client (:) exception.
这就是为什么从客户端(:)异常中检测到潜在危险的Request.Path值的原因。
Below is how URL are formed with querystring. 以下是如何使用querystring构成URL。
Response.Redirect("http://url/mobileservice.asmx/kioskOyunKodu?kioskkod="+ kioskID + "&kioskKodEncryped=" + encodedCode + "&okulno=" + txt_StudentID.Text);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.