可能加载与jQuery.load()函数ASCX? [英] Possible to load ASCX with jQuery.load() function?

查看:290
本文介绍了可能加载与jQuery.load()函数ASCX?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在没有ASPX文件封装这些控件?该注册标记让我觉得它不是。

Is it possible without encapsulating these controls in aspx files? The Register tag makes me think that it is not.

推荐答案

一种可能的方式将是有一个充当主机在正常的网页形式ASCX通用ASPX存根页面的方式进行回调至该页面使用jQuery的$。阿贾克斯()方法,一些参数来表示要加载哪些ascx控件。

One possible way would be to have a generic aspx stub page that acts as a host to the ascx in the normal web forms way make a callback to the that page using JQuery's $.ajax() method with some arguments to denote what ascx control you want to load.

然后存根/主机页面上,重写Render方法和使用response.output.write直接呈现控件输出流。客户机上的回调处理程序将捕获的输出,然后将其可被插入到以正常方式的DOM或使用的$ .load(版本使用),允许一个DOM元素的规范。

Then on your stub / host page, override the render method and render the control directly to the output stream using response.output.write. The callback handler on the client will catch the output and then it can be inserted into the DOM in the normal way or using using the version of $.load() that allows the specification of a DOM element.

希望这有助于。

这篇关于可能加载与jQuery.load()函数ASCX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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