Hi micah,
Check the example.
HTML
Login
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<asp:Login ID="LoginINNOVATION" runat="server" OnAuthenticate="ValidateUser" Width="100%">
<LayoutTemplate>
<asp:Literal ID="ltText" runat="server" EnableViewState="False"></asp:Literal>
<div id="loginForm">
<div class="form-group">
<label class="control-label" for="username">
Username
</label>
<asp:TextBox ID="UserName" runat="server" placeholder="Your UserName" autofocus="" class="form-control" required=""></asp:TextBox>
<span class="help-block small">Your unique username to app</span>
</div>
<div class="form-group">
<label class="control-label" for="password">Password</label>
<asp:TextBox ID="Password" autocomplete="off" runat="server" placeholder="******" class="form-control" title="Please enter your password" required="" value="" name="password" TextMode="Password"></asp:TextBox>
<span class="help-block small">Your strong password</span>
</div>
<div class="form-group">
<label class="control-label">Role</label>
<asp:DropDownList ID="Location" runat="server" CssClass="form-control pro-edt-select form-control-primary" Width="100%">
<asp:ListItem>--Select Department--</asp:ListItem>
<asp:ListItem>Location1</asp:ListItem>
<asp:ListItem>Location2</asp:ListItem>
</asp:DropDownList>
<span class="help-block small">Your role </span>
</div>
<div class="checkbox login-checkbox">
<asp:CheckBox ID="RememberMe" runat="server" Text="Remember me next time." class="i-checks" />
<p class="help-block small">(if this is a private computer)</p>
</div>
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Sign In" class="btn btn-success btn-block loginbtn" type="button" />
</div>
</LayoutTemplate>
</asp:Login>
</asp:Content>
Location
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div class="tab-content-details shadow-reset">
<asp:DropDownList runat="server" ID="ddlLocations">
</asp:DropDownList>
</div>
</asp:Content>
Code
Login
protected void ValidateUser(object sender, EventArgs e)
{
DropDownList ddllocation = LoginINNOVATION.FindControl("Location") as DropDownList;
string location = ddllocation.SelectedItem.Text.Trim();
Session["Location"] = location;
// Login validation code.
Response.Redirect("~/LocationPage.aspx");
}
Location
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
if (Session["Location"] != null)
{
this.ddlLocations.Items.Clear();
this.ddlLocations.Items.Insert(0, new ListItem(Session["Location"].ToString(), Session["Location"].ToString()));
}
}
}