Hi,
Stone me now. I am not a programmer or even a web developer. I am however falling victim to a strong learning curve - I have been asked to look at a site that is having a problem and fix it, and its imperative that I do so :)
The problem that I am having is with a page called login.aspx - this is obviously a login page. Everything works great in mozilla. When I call the page up in IE the page loads fine, but nothing happens when I enter a used id and submit.
The code, from what I can tell, on the formside looks very standard, almost as if it was cut and pasted from a tutorial.
<form id="Form1" method="post" runat="server">
<h3><font face="Verdana">Login Page</font></h3>
<span class="Normal">Company ID:</span> <br>
<input class="NormalTextBox" id="CustomerCode" type="text" name="UserEmail" runat="server">
<ASP:REQUIREDFIELDVALIDATOR id="Requiredfieldvalidator1" runat="server" ErrorMessage="You Must Enter a Valid Company ID." Display="Static" ControlToValidate="CustomerCode" Width="276px" cssclass="NormalRed"></ASP:REQUIREDFIELDVALIDATOR>
<br>
<br>
<ASP:CHECKBOX id="PersistForms" runat="server" autopostback="true" text="Remember me" cssclass="Normal"></ASP:CHECKBOX>
<br>
<br>
<asp:imagebutton id="SigninBtn" runat="server" ImageUrl="~/images/signin.gif"></asp:imagebutton><br>
<asp:label id="Msg" runat="server" cssclass="NormalRed"></asp:label>
</form>
The authentification portion of the web.config reads like this :
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".ASPXAUTHSC" protection="All" timeout="60"/>
</authentication>
Finally, the login.aspx.vb is apparently some stock code generated from some code generator...
Imports System.Security
Imports System.Web.Security
Public Class Login
Inherits System.Web.UI.Page
Protected WithEvents Requiredfieldvalidator1 As System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents PersistForms As System.Web.UI.WebControls.CheckBox
Protected WithEvents Msg As System.Web.UI.WebControls.Label
Protected WithEvents SigninBtn As System.Web.UI.WebControls.ImageButton
Protected WithEvents CustomerCode As System.Web.UI.HtmlControls.HtmlInputText
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
Public Sub Login_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles SigninBtn.Click
Dim security As New ASPNetPortal.UsersDB()
Dim userId As String = security.Login(CustomerCode.Value.ToString())
If Not (userId Is Nothing) And userId <> "" Then
FormsAuthentication.RedirectFromLoginPage _
(userId, PersistForms.Checked)
Else
Msg.Text = "<" & "br" & ">Login Failed!" & "<" & "br" & ">"
End If
End Sub
End Class
I know enough about this to get myself into a heap of trouble, and im probably looking in the wrong place. For all I know it could be a browser issue for end users who dont have the right browser version or .net version running. I dont know.
Any help would be appreciated, if you need more info feel free to let me know!
Mike E