Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. ViewBag.Title = "VerificaChat";
  2. string json = "{"logado":"true"}";
  3. Response.Clear();
  4. Response.ContentType = "application/json; charset=utf-8";
  5. Response.Write(json);
  6. Response.End();
  7.  
  8. <script>
  9. $(document).ready(function () {
  10. $.get("http://localhost:3641/Home/VerificaChat", function (data, status) {
  11. alert("Data: " + data + "nStatus: " + status);
  12. if (data == ".PermissionCookie") {
  13. return true;
  14. } else {
  15. alert("Oooops! Você não tem permissão!");
  16. window.location.replace("/Index/Autenticacao")
  17. return false;
  18. }
  19. });
  20. });
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement