calling ajax call according to user permissions

Serizzim

New Member
I have jquery buttons in my website,but some of these buttons doesnt have to clickable by every user so there must be permissions, all buttons make ajax calls so how can i control that buttons, for example if I have 3 buttons like:
\[code\]button1_click()some ajaxcallsbutton2_click()some other ajax callsbutton3_click()another calls\[/code\]so admin can call this events, but simple user only have to call button3's
what kind of approach I need?
-Do i have to control every button using another ajax call like:\[code\]button1_click() an ajax call (permission.aspx) read session,admin or not,return true or false if(true) { someajaxcall() }\[/code\]-Or I have to hide or show buttons according to session? but i dont know how can i do that.
Im using asp.net and jquery
 
Back
Top