问题描述
Prob1:我有2列出了我想我会被重定向下一个页面来访问。
当前的结果,
当我通过我的结果,在url它显示的列表数据类型。
Prob1:I have 2 lists which i want to access in the next page which i will be redirecting.Current result, When i pass my result, in the url it shows the List data type.
例如:System.Collections.Generic.List1 [IDataEntities.ISearchResultsEntity]
Prob2:我在阿贾克斯后一个方法调用,我可以导航到该方法,但里面我做的Response.Redirect其失败说Threadabort异常
Prob2:I have a method call in ajax post,I am able to navigate to the method but inside i have done response.redirect which fails saying "Threadabort exception"
推荐答案
使用会话来保存您的列表如下
use Session to hold your list as below
Session["mylist"] = list;
您可以从下一个页面访问它,还有很多其他的方法。请查看此。
you can access it from next page, there are many other ways. please check this link.
当你调用的Response.Redirect
叫它如下
Response.Redirect(url, false);
Context.ApplicationInstance.CompleteRequest();
但是不要从服务器端Ajax调用重定向,那些Ajax调用完成后,您可以从客户端的呼叫重定向。
but don't do Redirect on ajax call from server side, ones ajax call completed you can redirect from client side call.
这是成功的AJAX回调方法
on success ajax call back method
window.location = '[url to redirect]';
这篇关于如何通过列表中的Response.Redirect参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!