在异步中,方法无法正常工作 [英] In asynchronous, method is not working properly

查看:66
本文介绍了在异步中,方法无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,

我在网页中使用异步功能.因此,如果重定向到其他页面,异步功能将调用先前的网页功能.即使我在不​​同的页面.一切正常. (我的意思是从不同的页面我可以访问不同的页面方法).我的问题是该方法内部,我正在调用一个javascript.简单的javascript之类的警告消息.但是警报消息不会到来.请帮我.

注意:

EX:我在Home.aspx页面中.在此页面中,我写了一种方法.
从主页我重定向到MyViewPage.aspx页面. 5分钟后,将调用Home.aspx方法.在该方法内部,我只是调用了一个javascript.该JavaScript无法正常工作.我认为是因为异步.

不仅是javascript.无论我在该方法中编写了什么,整个功能都无法正常工作. Just方法将被调用并执行.但是我无法获得预期的结果.

Hai,

I am using asynchronous functionality in my webpage. So if redirected to some other page the asynchronous function is calling the previous webpage function. Even if i am in different page. This is working fine. (I mean from different page i can able to access the the different page method). My problem is inside that method i am calling one javascript. Simple javascript like alert message. But alert message is not coming. Pleas help me.

Note :

EX : I am in Home.aspx page. In this page i have writen one method.
From home page i redirected to MyViewPage.aspx page. After 5mins Home.aspx mehtod will be invoke. Inside that method i just call a javascript. That javascript is not working. I think because of asynchronous.

Not only javascript. Whatever i have writen inside that method the whole function is not working. Just method will be invoke and execute. But i can not get my expected result.

推荐答案

检查这些博客
异步方法调用 [ http://forums.asp.net/t/1250234.aspx/1 [ ^ ]
--NDK
check these blogs
Asynchronous Method Invocation[^]
http://forums.asp.net/t/1250234.aspx/1[^]
--NDK


据我所知,您想知道为什么跨页方法调用中未触发javascript方法吗?
可能是javascript在您的浏览器上运行,而被调用的页面从未在您的浏览器中呈现,因此javascript从未运行.

您的异步调用是在服务器端处理的,它将创建页面对象,但永远不会将其发送到浏览器.
As i understand you are wondering why a javascript method is not fired in a cross page method call?
It could be that javascript runs on your browser and that the called page is never rendered in your browser and therefore the javascript is never run.

Your asynchronous call are handled server side, which would create the page objects but never send them to the browser.


这篇关于在异步中,方法无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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