PostbackUrl 与 NavigateUrl
有人可以告诉我 LinkButton.PostBackUrl 和 HyperLink.NavigateUrl 之间的区别吗? 我有一个 asp.net 2.0 应用程序,它在整个应用程序中使用这两种方法,并且一切正常。 但是,如果我通过公司 VPN 连接到应用程序,所有使用 LinkButton.PostBackUrl 的链接都会给我一个 (54) Connection Reset by Peer 错误,并且 HyperLink.NavigateUrl 工作得很好。 我想知道这些命令之间的根本区别,以便我可以尝试找出 VPN 软件阻止的内容,从而导致对等错误重置连接。
Can someone tell me the different between LinkButton.PostBackUrl and HyperLink.NavigateUrl? I've got a asp.net 2.0 application that uses both methods throughout the application and everything works fine. However if I connect to the application over the company vpn all of the links that use LinkButton.PostBackUrl give me a (54) Connection reset by peer error and the HyperLink.NavigateUrl work just fine. I want to know the underlying difference between the commands so I can try to figure out what the vpn software is blocking that is causing the Connection reset by peer error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
NavigateURL:向 URL 提交“Get”请求(就像您在浏览器中输入该请求一样)
PostBackURL:向指定 URL 提交包含表单信息的“Post”请求; 我不相信这是常用的
NavigateURL: Submits a 'Get' request to the URL (just like if you had typed it in your browser)
PostBackURL: Submits a 'Post' request containing the information from the form to the specified URL; I don't believe this is commonly used
链接按钮的 PostBackURL 告诉您该按钮将数据发布到哪个表单。 (更多详细信息)
超链接的 NavigateURL 告诉您该链接是从服务器获取的控件。
The PostBackURL for the linkbutton tells you which form the button is posting data to. (more details)
The NavigateURL for the Hyperlink tells you which control, the link is getting from the server.
PostBackUrl 首先将当前的 Web 表单发布或发送到服务器,然后将您重定向到指定的 url,而 NavigateUrl 直接将您带到指定的 url,而不将当前页面提交到服务器
PostBackUrl first posts or sends the current web form to server and then redirects you to the specified url,while NavigateUrl directly takes you to the url specified without submitting the current page to the server