1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
<MM:DataSet
id="wwwebconcepts_login"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conRencontresLoisirs"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_conRencontresLoisirs"] %>'
CommandText='<%# "SELECT IDMembre, Nom, Prénom, Actif, Email, MotDePasse FROM tabMembres WHERE tabMembres.Actif = true AND tabMembres.Email = @User_Name And tabMembres.MotDePasse = @User_Password" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@User_Name" Value='<%# ((Request.Form["User_Name"] != null) && (Request.Form["User_Name"].Length > 0)) ? Request.Form["User_Name"] : "xyz" %>' Type="VarChar" />
<Parameter Name="@User_Password" Value='<%# ((Request.Form["User_Password"] != null) && (Request.Form["User_Password"].Length > 0)) ? Request.Form["User_Password"] : "xyz" %>' Type="VarChar" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<script language="C#" runat=server>
// ===============================================================================
// WWWeb Concepts ASP.NET Development Solutions www.ebconcepts.com
// Copyright 2002. All Rights Reserved.
// ===============================================================================
void Login_Click(Object sender, EventArgs E)
{
{
if (wwwebconcepts_login.RecordCount > 0)
{
FormsAuthentication.RedirectFromLoginPage(User_Name.Text, RememberMe.Checked);
string sID = ???;
string sNom = ???;
string sPrénom = ???;
Response.Redirect("accueilMembre.aspx?ID=" + sID + "&NOM=" + sNom + "&PRE=" + sPrénom;
}
else
{
ErrorMsg.Text="Login et/ou mot de passe incorrect. Désolé !";
}
}
} |
Partager