Hi,
I'm developing a web chat application and need to close one of user's browser or disable a few controls from server side.
the exact thing I need to do is let one user make another user log out of chat room so I try to redirect it to another page and perform the logout action in it:
Response.Redirect("Server.aspx?action=Logout&u=" + userId);
I use the same code on button click events and it works fine. but when I call the related function through javascript code it doesn't go to the Server.aspx!!
[Ajax.AjaxMethod(HttpSessionStateRequirement.ReadWrite)]
public void ExitBrowser(string userId)
{
Response.Redirect("Server.aspx?action=Logout&u=" + userId);
}
Any idea is appreciated!
I'm developing a web chat application and need to close one of user's browser or disable a few controls from server side.
the exact thing I need to do is let one user make another user log out of chat room so I try to redirect it to another page and perform the logout action in it:
Response.Redirect("Server.aspx?action=Logout&u=" + userId);
I use the same code on button click events and it works fine. but when I call the related function through javascript code it doesn't go to the Server.aspx!!
[Ajax.AjaxMethod(HttpSessionStateRequirement.ReadWrite)]
public void ExitBrowser(string userId)
{
Response.Redirect("Server.aspx?action=Logout&u=" + userId);
}
Any idea is appreciated!