如何从Aspx页面的JavaScript函数调用Ascx页面 [英] How to Call Ascx page from JavaScript Function Of Aspx page

查看:105
本文介绍了如何从Aspx页面的JavaScript函数调用Ascx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从aspx页面的Javascript函数调用ascx页面





通过按钮点击aspx重新加载ascx页面页面



i像这样使用但没有用

I want to call a ascx page from Javascript function of aspx page
or

reload a ascx page via button click of aspx page

i used like this but no use

 function refresh(){ 
__doPostBack('<%=upNotes.ClientID %>', 'addTocart');
}





帮我解决这个问题



在此先感谢



Help me to solve this issue

Thanks in advance

推荐答案

我认为直接请求ascx文件是不可能的 - 即将MyControl.ascx作为url参数提供给
I don't think it's possible by requesting the ascx file directly--i.e. supplying "MyControl.ascx" as the url parameter to


.ajax(..)。 ascx文件不会直接由Web服务器公开。



提供包含用户控件的aspx页面的URL - 即。如果MyControl.ascx的实例存在于MyPage.aspx上,则必须提供MyPage.aspx作为url参数。
.ajax(..). The ascx file isn't exposed directly by the web server.

supply the url of the aspx page containing the user control--i.e. if an instance of MyControl.ascx lives on MyPage.aspx you would have to supply "MyPage.aspx" as the url parameter.


无法直接访问.ascx,您只能访问。在你的情况下aspx
Cant access .ascx directly you will only able to access .aspx in your case


这篇关于如何从Aspx页面的JavaScript函数调用Ascx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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