简体   繁体   English

c# QueryString 如何将数据从一个网页发送到另一个网页?

[英]c# QueryString how to send data from one webpage to another?

I wanted to ask a little complicated question for me.我想问一个有点复杂的问题。 I want to make a simple program like I have website www.example1.com and there would be a simple panel to enter your name and your country.我想做一个简单的程序,就像我有网站www.example1.com一样,会有一个简单的面板来输入您的姓名和国家。 After that you have to click "send" and it will give you a request number like 12345. The data entered on that panel will be sent to the another site at wwww.example2.com.之后,您必须单击“发送”,它会给您一个请求编号,例如 12345。在该面板上输入的数据将发送到另一个站点 wwww.example2.com。 And I will check the data given from example1 to example2 (like: name: John, country: Jamaica, request number:12345).我将检查从 example1 到 example2 给出的数据(例如:姓名:约翰,国家:牙买加,请求编号:12345)。 I found on internet something like querystring at c# but im not sure what to do.我在互联网上找到了类似 c# 的查询字符串,但我不知道该怎么做。 I demand your help, best regards.我需要你的帮助,最好的问候。

Yes this is possible you could navigate the browser from site www.example1.com to www.example2.com/someAction?name=joe for example.是的,例如,您可以将浏览器从站点www.example1.com导航到www.example2.com/someAction?name=joe However, in order to validate against this you would need some sort of server in which example1 would have to send the data first and store it.但是,为了对此进行验证,您需要某种服务器,其中 example1 必须首先发送数据并存储它。 This would then allow example2 to call that service checking the data it got via query params was valid.这将允许 example2 调用该服务,检查它通过查询参数获得的数据是否有效。 This is a very long winded way to pass data about not sure it is a good solution.这是一种非常冗长的传递数据的方法,不确定它是否是一个好的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM