Linkbuttons statt normale Links in login form
This commit is contained in:
@@ -271,6 +271,7 @@
|
||||
<div class="container-fluid">
|
||||
<form id="form1" runat="server">
|
||||
<asp:Login ID = "Login1" runat = "server" OnAuthenticate= "ValidateUser" DestinationPageUrl="../Customers/CustomsAviso.aspx" >
|
||||
|
||||
<LayoutTemplate>
|
||||
<center>
|
||||
<!-- Große Bildschirme-->
|
||||
@@ -283,21 +284,21 @@
|
||||
</tr>
|
||||
<tr style="color:#003680; height:46px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="txt_CustomerID" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="Login" Width="320" Placeholder="Customer-ID" style="margin-left: 22px" Font-Size="1.25em"></asp:TextBox>
|
||||
<asp:TextBox ID="txt_CustomerID" CssClass="bg-UID-icon" runat="server" ValidationGroup="Login" Width="320" Placeholder="Customer-ID" style="margin-left: 22px" Font-Size="1.25em"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerIDrequired" runat="server" ControlToValidate="txt_CustomerID" ForeColor="Red" style="font-size:17px" SetFocusOnError="true" ValidationGroup="Login" ErrorMessage="Please enter the Customer-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumberInput" ControlToValidate="txt_CustomerID" style="font-size:17px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="false" ErrorMessage="The Customer-ID is not valid." ValidationExpression="[0-9]{4,10}"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:46px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="UserName" runat="server" CssClass="bg-user-icon" TextMode="SingleLine" Width = "320" ValidationGroup="Login" required="true" Font-Size="1.25em" style="margin-left:22px;color:#003680" Placeholder="Username" ></asp:TextBox>
|
||||
<asp:TextBox ID="UserName" runat="server" CssClass="bg-user-icon" TextMode="SingleLine" Width="320" ValidationGroup="Login" required="true" Font-Size="1.25em" style="margin-left:22px;color:#003680" Placeholder="Username" ></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="UserNamerequired" ForeColor="Red" Font-Size="17px" runat="server" ControlToValidate="UserName" SetFocusOnError="true" ErrorMessage="Please enter the Username." ToolTip="The Username is required." ValidationGroup="Login"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="check_UserName_regex" ControlToValidate="UserName" Font-Size="17px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="true" ErrorMessage="Username does not meet the requirements." ValidationExpression="^([a-zA-Z1-9]{4,30})$"></asp:RegularExpressionValidator>
|
||||
<asp:RegularExpressionValidator ID="check_UserName_regex" ControlToValidate="UserName" Font-Size="17px" ForeColor="Red" ValidationGroup="Login" runat="server" Display="Dynamic" SetFocusOnError="true" ErrorMessage="Username does not meet the requirements." ValidationExpression="^([a-zA-Z1-9]{4,30})$"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:46px;">
|
||||
<td align="left" colspan="2">
|
||||
<asp:TextBox ID="Password" runat="server" CssClass="bg-key-icon" TextMode="Password" required="true" Width = "320" Font-Size="1.25em" ValidationGroup="Login" MaxLength="30" AutoCompleteType="Disabled" CausesValidation="true" style="margin-left:22px;color:#003680" Placeholder="Password"></asp:TextBox>
|
||||
<asp:TextBox ID="Password" runat="server" CssClass="bg-key-icon" TextMode="Password" required="true" Width="320" Font-Size="1.25em" ValidationGroup="Login" MaxLength="30" AutoCompleteType="Disabled" CausesValidation="true" style="margin-left:22px;color:#003680" Placeholder="Password"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="Passwordrequired" ForeColor="Red" runat="server" ControlToValidate="Password" Font-Size="17px" ToolTip="Please enter the Password." ValidationGroup="Login" SetFocusOnError="true" ErrorMessage="Password is needed to authenticate."></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -311,7 +312,7 @@
|
||||
<asp:CheckBox ID="RememberMe" runat="server" ValidationGroup="Login" Text="Remember me." style="margin-left:22px;"/>
|
||||
</td>
|
||||
<td align="right" colspan="4">
|
||||
<a id="btn_ForgotPW" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-154px;margin-right:-42px">I forgot my password</a>
|
||||
<asp:LinkButton id="btn_ForgotPW" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-154px;margin-right:-42px">I forgot my password</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:16px">
|
||||
@@ -331,7 +332,7 @@
|
||||
</tr>
|
||||
<tr style="color:#003680; height:86px">
|
||||
<td align="left">
|
||||
<asp:TextBox ID="txt_CustomerID_M" CssClass="bg-UID-icon" runat="server" required="true" ValidationGroup="Login_M" Width="325" Placeholder="Customer-ID" Font-Size="2.025em" style="margin-left: 22px;margin-top:20px;"></asp:TextBox>
|
||||
<asp:TextBox ID="txt_CustomerID_M" CssClass="bg-UID-icon" runat="server" ValidationGroup="Login_M" Width="325" Placeholder="Customer-ID" Font-Size="2.025em" style="margin-left: 22px;margin-top:20px;"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="CustomerID_M_required" runat="server" ControlToValidate="txt_CustomerID_M" SetFocusOnError="false" ForeColor="Red" style="margin-left:22px;font-size:19px" ValidationGroup="Login_M" ErrorMessage="Please enter the Customer-ID."></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="valid_getNumber_M_Input" ControlToValidate="txt_CustomerID_M" ValidationGroup="Login_M" ForeColor="Red" Font-Size="20px" runat="server" style="margin-left:22px;font-size:19px" Display="Dynamic" SetFocusOnError="false" ValidationExpression="[0-9]{4,10}" ErrorMessage="The Customer-ID is not valid."></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
@@ -359,7 +360,7 @@
|
||||
<asp:CheckBox ID="RememberMe_M" runat="server" ValidationGroup="Login_M" style="margin-left:22px;"/><label for="RememberMe_M" id="lbl_for_chkbox_M">Remember me.</label>
|
||||
</td>
|
||||
<td align="right" colspan="2">
|
||||
<a id="btn_ForgotPW_M" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-164px;margin-right:-62px;">I forgot my password</a>
|
||||
<asp:LinkButton id="btn_ForgotPW_M" runat="server" target="_top" href="ForgotPW.aspx" style="margin-left:-164px;margin-right:-62px;">I forgot my password</asp:LinkButton>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="color:#003680; height:12px">
|
||||
|
||||
@@ -18,24 +18,24 @@ Partial Class login_FLEX
|
||||
'ConnectionString = "Server=db593295684.db.1and1.com;Database=db593295684;Uid=dbo593295684;Pwd=atilla#2;"
|
||||
End If
|
||||
|
||||
Dim tb As TextBox = form1.FindControl("txt_CustomerID")
|
||||
Dim tb_M As TextBox = form1.FindControl("txt_CustomerID_M")
|
||||
Dim tb2 As TextBox = form1.FindControl("UserName")
|
||||
Dim tb2_M As TextBox = form1.FindControl("UserName_M")
|
||||
Dim tb3 As TextBox = form1.FindControl("Password")
|
||||
Dim tb3_M As TextBox = form1.FindControl("Password_M")
|
||||
Dim tb As TextBox = Login1.FindControl("txt_CustomerID")
|
||||
Dim tb_M As TextBox = Login1.FindControl("txt_CustomerID_M")
|
||||
Dim tb2 As TextBox = Login1.FindControl("UserName")
|
||||
Dim tb2_M As TextBox = Login1.FindControl("UserName_M")
|
||||
Dim tb3 As TextBox = Login1.FindControl("Password")
|
||||
Dim tb3_M As TextBox = Login1.FindControl("Password_M")
|
||||
|
||||
Dim reqfieldvaluserID As RequiredFieldValidator = Page.FindControl("CustomerIDrequired")
|
||||
Dim reqfieldvaluserID_M As RequiredFieldValidator = Page.FindControl("CustomerID_M_required")
|
||||
Dim reqfieldvaluserName As RequiredFieldValidator = Page.FindControl("UserNamerequired")
|
||||
Dim reqfieldvaluserName_M As RequiredFieldValidator = Page.FindControl("UserName_M_required")
|
||||
Dim reqfieldvalpassw As RequiredFieldValidator = Page.FindControl("Passwordrequired")
|
||||
Dim reqfieldvalpassw_M As RequiredFieldValidator = Page.FindControl("Passwordrequired_M")
|
||||
Dim reqfieldvaluserID As RequiredFieldValidator = Login1.FindControl("CustomerIDrequired")
|
||||
Dim reqfieldvaluserID_M As RequiredFieldValidator = Login1.FindControl("CustomerID_M_required")
|
||||
Dim reqfieldvaluserName As RequiredFieldValidator = Login1.FindControl("UserNamerequired")
|
||||
Dim reqfieldvaluserName_M As RequiredFieldValidator = Login1.FindControl("UserName_M_required")
|
||||
Dim reqfieldvalpassw As RequiredFieldValidator = Login1.FindControl("Passwordrequired")
|
||||
Dim reqfieldvalpassw_M As RequiredFieldValidator = Login1.FindControl("Passwordrequired_M")
|
||||
|
||||
Dim regexuserID As RegularExpressionValidator = Page.FindControl("valid_getNumberInput")
|
||||
Dim regexuserID_M As RegularExpressionValidator = Page.FindControl("valid_getNumber_M_Input")
|
||||
Dim regexusername As RegularExpressionValidator = Page.FindControl("check_UserName_regex")
|
||||
Dim regexusername_M As RegularExpressionValidator = Page.FindControl("check_UserName_M_regex")
|
||||
Dim regexuserID As RegularExpressionValidator = Login1.FindControl("valid_getNumberInput")
|
||||
Dim regexuserID_M As RegularExpressionValidator = Login1.FindControl("valid_getNumber_M_Input")
|
||||
Dim regexusername As RegularExpressionValidator = Login1.FindControl("check_UserName_regex")
|
||||
Dim regexusername_M As RegularExpressionValidator = Login1.FindControl("check_UserName_M_regex")
|
||||
|
||||
Dim Customer_ID As String = String.Empty
|
||||
Dim UserNaMe As String = String.Empty
|
||||
@@ -50,10 +50,8 @@ Partial Class login_FLEX
|
||||
If regexuserID.IsValid Then
|
||||
Customer_ID = tb.Text
|
||||
Else
|
||||
regexuserID.ErrorMessage = ""
|
||||
regexuserID.ErrorMessage = "Customer-ID has to be a number."
|
||||
End If
|
||||
Else
|
||||
reqfieldvaluserID.ErrorMessage = ""
|
||||
End If
|
||||
End If
|
||||
If String.IsNullOrEmpty(tb_M.Text) = False AndAlso String.IsNullOrEmpty(tb.Text) = True Then
|
||||
@@ -64,10 +62,8 @@ Partial Class login_FLEX
|
||||
If regexusername_M.IsValid Then
|
||||
Customer_ID = tb_M.Text
|
||||
Else
|
||||
regexusername_M.ErrorMessage = ""
|
||||
regexusername_M.ErrorMessage = "Username doeas not have any special chaaracters in it."
|
||||
End If
|
||||
Else
|
||||
reqfieldvaluserID_M.ErrorMessage = ""
|
||||
End If
|
||||
End If
|
||||
If String.IsNullOrEmpty(tb2.Text) = False AndAlso String.IsNullOrEmpty(tb2_M.Text) = True Then
|
||||
@@ -78,10 +74,10 @@ Partial Class login_FLEX
|
||||
If regexusername.IsValid Then
|
||||
UserNaMe = tb2.Text
|
||||
Else
|
||||
regexusername_M.ErrorMessage = ""
|
||||
regexusername_M.ErrorMessage = "Username doeas not have any special chaaracters in it."
|
||||
End If
|
||||
Else
|
||||
reqfieldvaluserName.ErrorMessage = ""
|
||||
reqfieldvaluserName.ErrorMessage = "Username has to be given."
|
||||
End If
|
||||
End If
|
||||
If String.IsNullOrEmpty(tb2.Text) = False AndAlso String.IsNullOrEmpty(tb2_M.Text) = True Then
|
||||
@@ -93,14 +89,13 @@ Partial Class login_FLEX
|
||||
If regexusername.IsValid Then
|
||||
UserNaMe = tb2_M.Text
|
||||
Else
|
||||
regexusername.ErrorMessage = ""
|
||||
regexusername.ErrorMessage = "Password has to match the criterias of tge info button."
|
||||
End If
|
||||
Else
|
||||
reqfieldvaluserName_M.ErrorMessage = ""
|
||||
End If
|
||||
If reqfieldvalpassw.IsValid AndAlso String.IsNullOrEmpty(tb3_M.Text) = False AndAlso String.IsNullOrEmpty(tb3.Text) = True Then
|
||||
reqfieldvalpassw.Enabled = True
|
||||
reqfieldvalpassw_M.Enabled = False
|
||||
If String.IsNullOrEmpty(tb3_M.Text) = False AndAlso String.IsNullOrEmpty(tb3.Text) = True Then
|
||||
reqfieldvalpassw.Enabled = True
|
||||
reqfieldvalpassw_M.Enabled = False
|
||||
|
||||
reqfieldvalpassw.Validate()
|
||||
If reqfieldvalpassw.IsValid = True Then
|
||||
End If
|
||||
@@ -114,7 +109,7 @@ Partial Class login_FLEX
|
||||
If reqfieldvalpassw_M.IsValid = True Then
|
||||
passw = tb3_M.Text
|
||||
Else
|
||||
reqfieldvalpassw_M.ErrorMessage = ""
|
||||
reqfieldvalpassw_M.ErrorMessage = "Password has to be given."
|
||||
End If
|
||||
End If
|
||||
' Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
|
||||
|
||||
Reference in New Issue
Block a user