Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有我的ashx处理程序,它响应一个字符串。
ashx
context.Response.Write("test");
如何在另一个 Web 表单中获取此字符串?
我努力了:
WebClient client = new WebClient(); html2 = client.DownloadString("~/handles/myhandler.ashx");
但这似乎不适用于相对网址。
WebClient将发出一个 HTTP 请求。所以它需要知道整个 URL。就像您在浏览器中输入 URL 一样。
WebClient
从文档:
如果 BaseAddress 属性不是空字符串 ("") 并且 address 不包含绝对 URI,则 address 必须是与 BaseAddress 组合以形成所请求数据的绝对 URI 的相对 URI。如果 QueryString 属性不是空字符串,则将其附加到地址。
参考:http: //msdn.microsoft.com/en-us/library/xz398a3f.aspx
I have the error
Uncaught TypeError: Object # has no method 'fancybox'
in my JS console on this website Reference php × 1429865 c/c++ × 756500 nginx × 49975 mongodb × 159057 mybatis × 3233 anaconda × 13410 pycharm × 14671 python × 1902243 vscode × 56040 docker × 110988 github × 49000 flask × 49129 ffmpeg × 24037 jmeter × 16910 matplotlib × 63493 bootstrap × 54641