我的WebMethod返回页面的完整HTML [英] My WebMethod returns full HTML of the page

查看:62
本文介绍了我的WebMethod返回页面的完整HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从自动完成文本框调用的WebMethod静态函数。



我的项目中有一些东西会阻止页面方法返回JSON。我检查了代码,如果我打开新的干净项目,它就有效。



项目是.NET 3.5,控件不在更新面板中。



全功能写入在这个问题 [ ^ ]如果有人需要检查它。



我需要想法和提示。以前有人有类似的问题吗?我已经失去了三天,我不知道在哪里看。





我试过了:

通过Response.Write和NewtonSoft JsonConvert直接写入响应

从[webmethod] [scriptMethod]返回,输出参数类型为JSON

返回简单的字符串和字符串数组以及字符串列表

注释掉Web配置的各个部分

ajaxToolkit自动完成扩展器

jQuery UI自动完成变体

普通的javascript异步请求(基本上是$ .ajax的内部)

将函数调用移动到没有HTML的页面中(但当然ajaxToolkit会使各种脚本混乱: ()







谢谢。

I have a WebMethod static function that gets called from autocomplete textbox.

There is something in my project that prevents the page method from returning JSON. I've checked the code, it works if I open new clean project.

The project is .NET 3.5, the control is not within update panel.

Full function writeup is in this question[^] if someone needs to check it.

I need ideas and hints. Anyone had similar problem before? I've lost three days already and I don't know where to look anymore.


I've tried:
writing directly into the Response via Response.Write and NewtonSoft JsonConvert
returning from [webmethod][scriptMethod] with output param type JSON
returning simple string and string array and list of string
commenting out sections of web config
ajaxToolkit Autocomplete Extender
jQuery UI autocomplete variations
plain javascript async request (essentially the internals of $.ajax)
moving the function call into the page without HTML (but of course ajaxToolkit gets it cluttered with various scripts :( )



Thank you.

推荐答案

.ajax)

将函数调用移动到没有HTML的页面中(但是当然ajaxToolkit会让各种脚本混乱:()






谢谢。
.ajax)
moving the function call into the page without HTML (but of course ajaxToolkit gets it cluttered with various scripts :( )



Thank you.


你在ajax调用中发送JSON请求类型吗?
R u sending JSON request type in your ajax call ?


这篇关于我的WebMethod返回页面的完整HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆