简体   繁体   English

如何从C#中的Ajax处理程序获取重定向URL

[英]how to get redirect url from ajax handler in c#

我向用户想要的ajaxhandler发送请求,如果用户未登录,则它将重定向URL发送回登录页面,并且该页面在ajaxrequest响应后自动重定向到登录页面

我们通过在JSON响应中传递url,然后让AJAX处理程序检查并设置位置来实现此目的,但这可能会带来安全问题,您可能只想发回一个标志或其他内容并保留url在客户端。

i have a idea that 我有一个想法

sending request using json in json return the redirect url and when you get json result then redirect to specific page 在json中使用json发送请求时,返回重定向网址,当您获得json结果时,则重定向到特定页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从 C# 中的 Slack 重定向 URL 获取代码参数 - How to GET code Parameter from Slack Redirect URL in C# 重定向后C#从url获取参数 - C# get parameter from url after redirect 如何从c#controller重定向到外部URL - how to redirect to external url from c# controller 如何从 C# 控制器重定向到 URL(带有自定义标头) - How to redirect to URL (with custom headers) from C# Controller How to Redirect and post a collection of data to destination URL and redirect to that external URL in MVC c# without using Ajax or client side - How to Redirect and post a collection of data to destination URL and redirect to that external URL in MVC c# without using Ajax or client side 如何从MVC自定义路由器处理程序将用户重定向到另一个URL? - How to redirect user to another Url from MVC Custom Router Handler? 如何从没有javascript和没有Ajax的MVC4 C#获取json - How to get json from MVC4 C# with no javascript and no Ajax 如何通过AJAX状态码从C#Webmethod获取数据? - How to get data from C# Webmethod via AJAX statuscode? 如何使用 c# 从 ajax 中的嵌套 JSON 对象中获取值 - how to get values from nested JSON object in ajax with c# 如何使用 ajax c# 从 controller 获取数据 - How to Get Data from controller with ajax c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM