使用asp.net发布方法

编程入门 行业动态 更新时间:2024-10-16 02:25:22
本文介绍了使用asp发布方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, i想知道使用带有c#的asp的post方法。 i已经搜索了密集但我只有客户端代码。 但我热切期待使用c#的服务器端代码如何使用post方法将值从一个页面传递到另一个页面? 请放弃解决方案,这对我非常有帮助。 感谢提前...

解决方案

检查msdn了解更多信息: msdn.microsoft/ en-us / library / vstudio / ms178139%28v = vs.100%29.aspx [ ^ ] 点击此处查看更多信息和例如: http:// msdn.microsoft/en-us/library/vstudio/6c3yckf w%28v = vs.100%29.aspx [ ^ ] 祝你好运!

你我想使用WebClient类 msdn.microsoft/en-us/library/system.webclient.aspx [ ^ ] 有关示例,请参阅 stackoverflow/questions / 5401501 / how-to-post-data-to-specific-url-using-webclient-in-c-sharp [ ^ ] 或google for C# WebClient帖子示例 您可能还想查看这篇文章在ASP.NET中重定向和POST [ ^ ]

可以通过使用以下两个类中的一个来实现纯后HTTP请求:更灵活 System.Net.HttpWebRequest 或更简单(在某些常见情况下) System.Net.WebClient : msdn.microsoft/en-us/library/system .httpwebrequest.aspx [ ^ ], http:// msdn .microsoft / EN-US /库/ system.webclient.aspx [ ^ ]。 另见我过去的答案:如何从其他网站获取数据 [ ^ ]。
-SA

hi all, i want to know the post method using asp with c#. i have googled intensively but i have got only client side code. but am eagerly looking forward for server side code using c# how can i pass value from one page to another page using post method? please drop a solution, its very much helpful to me. thanks to advance...

解决方案

Check msdn for more info: msdn.microsoft/en-us/library/vstudio/ms178139%28v=vs.100%29.aspx[^] Check here for more info and an example: msdn.microsoft/en-us/library/vstudio/6c3yckfw%28v=vs.100%29.aspx[^] Good luck!

You'll want to use the WebClient class msdn.microsoft/en-us/library/system.webclient.aspx[^] For an example see stackoverflow/questions/5401501/how-to-post-data-to-specific-url-using-webclient-in-c-sharp[^] Or google for C# WebClient post examples You may also want to review this article Redirect and POST in ASP.NET[^]

Pure post HTTP request can be achieved by using one of the two classes: more flexible System.Net.HttpWebRequest or simpler (in some common cases) System.Net.WebClient: msdn.microsoft/en-us/library/system.httpwebrequest.aspx[^], msdn.microsoft/en-us/library/system.webclient.aspx[^]. See also my past answer: How to get the data from another site[^].
—SA

更多推荐

使用asp.net发布方法

本文发布于:2023-10-11 10:13:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1481406.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   asp   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!