使用asp.net发布方法 [英] post method using asp.net
本文介绍了使用asp.net发布方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
i想知道使用带有c#的asp.net的post方法。
i已经搜索了密集但我只有客户端代码。
但我热切期待使用c#的服务器端代码如何使用post方法将值从一个页面传递到另一个页面?
请放弃解决方案,这对我非常有帮助。
感谢提前...
解决方案
检查msdn了解更多信息:
http://msdn.microsoft.com/ en-us / library / vstudio / ms178139%28v = vs.100%29.aspx [ ^ ]
点击此处查看更多信息和例如:
http:// msdn.microsoft.com/en-us/library/vstudio/6c3yckf w%28v = vs.100%29.aspx [ ^ ]
祝你好运!
你我想使用WebClient类
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx [ ^ ]
有关示例,请参阅< a href =http://stackoverflow.com/questions/5401501/how-to-post-data-to-specific-url-using-webclient-in-c-sharp> http://stackoverflow.com/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
:
http://msdn.microsoft.com/en-us/library/system.net .httpwebrequest.aspx [ ^ ],
http:// msdn .microsoft.com / EN-US /库/ system.net.webclient.aspx [<一个href =http://msdn.microsoft.com/en-us/library/system.net.webclient.aspxtarget =_ blanktitle =New Window> ^ ]。
另见我过去的答案:如何从其他网站获取数据 [ ^ ]。
-SA
hi all,
i want to know the post method using asp.net 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:
http://msdn.microsoft.com/en-us/library/vstudio/ms178139%28v=vs.100%29.aspx[^]
Check here for more info and an example:
http://msdn.microsoft.com/en-us/library/vstudio/6c3yckfw%28v=vs.100%29.aspx[^]
Good luck!
You'll want to use the WebClient class
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx[^]
For an example see http://stackoverflow.com/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 flexibleSystem.Net.HttpWebRequest
or simpler (in some common cases)System.Net.WebClient
:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx[^].
See also my past answer: How to get the data from another site[^].
—SA
这篇关于使用asp.net发布方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文