Вопрос

I have a pure JavaScript/html page (e.g., index.html) that is secured by a Login.aspx page with a asp.net login control. After a user input his account info, I want to get the list of roles that this authenticated user belongs to by using JavaScript in the index.html page. Can someone tell me how to do it?

Many thanks,

Wei

Это было полезно?

Решение

Use an ajax call, which is quite easy if you are using jQuery's ajax.

$.get('/some/url/to/retrieve/the/roles/from', function(roles) {

});
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top