How to provide permissions to particular user for accessing web page in asp.net? -
i created 1 page named welcome.aspx
. on page added 1 button,on button click event page should redirect page i.e userregisteration.aspx
page userregisteration.aspx
page should accessible particular user team lead,manager. if user other click on button , try access userregisteration.aspx
page error message should generate.
please suggest me how achieve above requirement?? in advance
use button code:
protected void button1_click(object sender, eventargs e) { string usertype = "team lead"; // set user type if (usertype=="team lead" || usertype=="manager") { response.redirect("userregisteration.aspx"); // redirects specified page } else { // shows error message scriptmanager.registerstartupscript(this, this.gettype(), "", "alert('you not valid user!')", true); } }
Comments
Post a Comment