Note that there are some explanatory texts on larger screens.

plurals
  1. PORedirecting admin to admin page and user to user's page
    primarykey
    data
    text
    <p>i'm having some problem over here. When user enter their id,it will show up the main page and its for user but when admin enter their id,it will enter the user's main page and i have to click admin site on the top hyperlink and it automatically logout and once i enter back admin passwrd and then only it redirect to admin page.how to make it like once user enter their passwrd it redirect to user page and once admin enter admin password in the login it redirect to admin ?I have 3 roles over here which are admin,staff and user.Hereby i'll provide you my aspx code and also my vb code which is running behind the program.please do assist me.thanks</p> <p>ASPX</p> <pre><code> &lt;asp:Login ID="Login1" runat="server" BackColor="#009933" BorderColor="Red" BorderPadding="4" BorderStyle="Ridge" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="Red" DestinationPageUrl="~/MainPage.aspx" style="text-align: center" Height="171px" Width="266px" VisibleWhenLoggedIn="True" TextLayout="TextOnTop"&gt; &lt;TextBoxStyle Font-Size="0.8em" /&gt; &lt;LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" /&gt; &lt;InstructionTextStyle Font-Italic="True" ForeColor="Black" /&gt; &lt;TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /&gt; &lt;/asp:Login&gt; </code></pre> <p>VB</p> <pre><code>Partial Class Login Inherits System.Web.UI.Page End Class </code></pre> <p><em>web.config</em> for <strong>staff</strong> folder</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;allow roles="staff" /&gt; &lt;deny users="" /&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre> <p><em>web.config</em> for <strong>admin</strong> folder</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;allow roles="adminstrator" /&gt; &lt;deny users="" /&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre> <p><em>web.config</em> - <strong>root</strong></p> <pre><code>&lt;configuration&gt; &lt;appSettings/&gt; &lt;connectionStrings&gt; &lt;add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/&gt; &lt;add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Se7en\Desktop\Personal\VIVA\1\App_‌​Data\ASPNETDB.MDF;Integrated Security=True;Connect Timeout=30;User Instance=True" providerName="System.Data.SqlClient"/&gt; &lt;/connectionStrings&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload