| | |
login working in IE but not mozilla?
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Solved Threads: 0
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.
The authentification portion of the web.config reads like this :
Finally, the login.aspx.vb is apparently some stock code generated from some code generator...
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
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.
ASP.NET Syntax (Toggle Plain Text)
<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 :
ASP.NET Syntax (Toggle Plain Text)
<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...
ASP.NET Syntax (Toggle Plain Text)
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
Ok, I am tired so bare that in mind.
But where is the event tied to the SignIn ImageButton? That is the submit button correct?
Is the code for this Login_Click is not tied to any object in the HTML side of the ASP.Net page?
Saying that, I am surprised it worked in Mozzilla. But from the code you have provided, the only reason it would not work is for the simple fact that there is not event coded for the On_Click of the ImageButton (your signIn Button).
Hope this helps

But where is the event tied to the SignIn ImageButton? That is the submit button correct?
Is the code for this Login_Click is not tied to any object in the HTML side of the ASP.Net page?
Saying that, I am surprised it worked in Mozzilla. But from the code you have provided, the only reason it would not work is for the simple fact that there is not event coded for the On_Click of the ImageButton (your signIn Button).
Hope this helps

•
•
•
•
Originally Posted by Sycophant
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.
ASP.NET Syntax (Toggle Plain Text)
<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 :
ASP.NET Syntax (Toggle Plain Text)
<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...
ASP.NET Syntax (Toggle Plain Text)
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
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Solved Threads: 0
So this code doesn't handle the process? I'm so lost 
If I am reading you correctly, I need an HTML side On_Click function assigned to that particular line of code....
I should stick to static web pages
Mike E

ASP.NET Syntax (Toggle Plain Text)
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
If I am reading you correctly, I need an HTML side On_Click function assigned to that particular line of code....
I should stick to static web pages

Mike E
Mike,
What Paladine is saying is ..there is no connection between your VB code and your HTML designer code..(meaning there is no way of event to be tiggered when you click the image button)
To solve:
1.Double click the SigninBtn(image) button and place this code
[CODE]
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
[\CODE]
What Paladine is saying is ..there is no connection between your VB code and your HTML designer code..(meaning there is no way of event to be tiggered when you click the image button)
To solve:
1.Double click the SigninBtn(image) button and place this code
[CODE]
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
[\CODE]
Save White Tiger
•
•
Join Date: Jun 2005
Posts: 6
Reputation:
Solved Threads: 0
here is where I am confused...
At the top of my login.aspx page (the html page) this code appears
In the login.aspx.vb
This is what is there. Im drawing the conclusion that the
should handle the actual On_Click...
Im getting and parsing all of this in dreamweaver so i'm not really sure how double clicking an image will let me fill in the code that operates the image.
Like I said, this is a mess I am in and I appreciate the feedback, eventually I will get this figured out and hopefully be able to learn this
Mike
At the top of my login.aspx page (the html page) this code appears
ASP.NET Syntax (Toggle Plain Text)
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="login.aspx.vb" Inherits="databasename.Login"%>
In the login.aspx.vb
ASP.NET Syntax (Toggle Plain Text)
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
This is what is there. Im drawing the conclusion that the
ASP.NET Syntax (Toggle Plain Text)
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
should handle the actual On_Click...
Im getting and parsing all of this in dreamweaver so i'm not really sure how double clicking an image will let me fill in the code that operates the image.
Like I said, this is a mess I am in and I appreciate the feedback, eventually I will get this figured out and hopefully be able to learn this

Mike
Ok, no update would change this. The code got changed. Period!
The VB Code for Login_Click event (see your code below) is not tied to anything on the HTML side that would activate it. (Make sense?)
So you have to associate that code to a control (from the HTML) side inorder for the event to fire. So do this:
As LetsCode stated:
1. Double Click on the SignIn Image Button (in Design view of the HTML code) to create the event SignIn_Click on the VB Code side.
2. Then copy and paste the code from Login_Click event into the newly created SignIn_Click event. **NOTE** DO NOT Copy and paste the code I am giving you to show you the result, actually do the process I have described
Result would be:
make sense I hope?

Your POST:
The VB Code for Login_Click event (see your code below) is not tied to anything on the HTML side that would activate it. (Make sense?)
So you have to associate that code to a control (from the HTML) side inorder for the event to fire. So do this:
As LetsCode stated:
1. Double Click on the SignIn Image Button (in Design view of the HTML code) to create the event SignIn_Click on the VB Code side.
2. Then copy and paste the code from Login_Click event into the newly created SignIn_Click event. **NOTE** DO NOT Copy and paste the code I am giving you to show you the result, actually do the process I have described
Result would be:
Public Sub SigninBtn_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 Submake sense I hope?

Your POST:
•
•
•
•
Originally Posted by Sycophant
here is where I am confused...
At the top of my login.aspx page (the html page) this code appears
ASP.NET Syntax (Toggle Plain Text)
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="login.aspx.vb" Inherits="databasename.Login"%>
In the login.aspx.vb
ASP.NET Syntax (Toggle Plain Text)
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
This is what is there. Im drawing the conclusion that theASP.NET Syntax (Toggle Plain Text)
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
should handle the actual On_Click...
Im getting and parsing all of this in dreamweaver so i'm not really sure how double clicking an image will let me fill in the code that operates the image.
Like I said, this is a mess I am in and I appreciate the feedback, eventually I will get this figured out and hopefully be able to learn this
Mike
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: i need your experience please help me
- Next Thread: File Download - Security Warning - Win XP
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class compatible confirmationcodegeneration content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form forms gridview gudi homeedition hosting iis javascript jquery list menu mssql nameisnotdeclared news novell opera order parent problem radio ratings redirect registration relationaldatabases reportemail search security select serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview typeof validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xml xsl





