ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Page redirection based on user role in ASP.Net<p>Hi <a class="username" rel="mehad"> mehad</a>,</p> <p>Refer the below html. LinkButton doesnot have property NavigateUrl, it has PostBackUrl.</p> <pre class="brush: html">&lt;div&gt; &nbsp;&nbsp;&nbsp; &lt;asp:LinkButton ID=&#34;lbNavigate&#34; Text=&#34;Details&#34; runat=&#34;server&#34; OnClick=&#34;lbNavigate_Click&#34; /&gt; &lt;/div&gt;</pre> <p><span style="text-decoration: underline;">Code</span></p> <pre class="brush: csharp">protected void lbNavigate_Click(object sender, EventArgs e) { &nbsp;&nbsp;&nbsp; string userType = "admin"; //Get usertype as per your logic. &nbsp;&nbsp;&nbsp; if (userType.ToLower() == "admin") &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lbNavigate.PostBackUrl = "~/app/admin/Default.aspx"; &nbsp;&nbsp;&nbsp; } &nbsp;&nbsp;&nbsp; else &nbsp;&nbsp;&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lbNavigate.PostBackUrl = "~/app/Default.aspx"; &nbsp;&nbsp;&nbsp; } }</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/964849/Page-redirection-based-on-user-role-in-ASPNet/https://www.aspforums.net:443/Threads/964849/Page-redirection-based-on-user-role-in-ASPNet/Wed, 22 Jun 2016 08:18:03 GMT