Login Page Problem; Click Events not fired

  • Thread starter Thread starter amit.purohit
  • Start date Start date
A

amit.purohit

hi,

I have a very strange problem on my login Page. the Page was working fine a
few days back, but now does not generate post back events for controls. this
login page uses form based authentication.

Whenever the button is clicked, no event is raised, infact it doesnt even go
to the page_load as well. Events are registered and there is no problem with
the code because the same code is working fine on Windows XP machine. The
machine which is giving problem is Windows 2000 Advanced server.

If I redirect the request forcefully to another page, everything works
perfectly fine across application, except this login.aspx.

its urgent,

thanks in advance.

Amit Purohit
(MCAD.NET)
 
Hi Amit,

Did the runat="server" attribute get removed from your asp:button server
control tag? Good luck! Ken.
 
Hmmm...Do you have any javascript that validates before submitting the page?
Without seeing any code or anything all I can suggest is deleting the page
from your project and then recreate it. Any chance that another page was
created in the same project with the same name? Maybe in a different
folder? Sometimes that causes problems although it is usually debugging
problems that that causes. Good luck! Ken.
 
hi,

there is encryption used in that page, will that make a difference.

this code is used on form onsubmit() and then the server side event is
raised. even this code is not executed.

function on_login_submit() {
var psd_combo;
if( document.forms[0].pwd.value != "" )
{
psd_combo = hex_sha1(document.forms[0].pwd.value) +
document.forms[0].sha1_seed.value; document.forms[0].sha1_seed.value =
hex_sha1(psd_combo);
}
return true;
}
 
I don't know if the encryption will make a difference. But if your form
never submits it sounds more like a client-side issue because the server
isn't involved. You could try to create a new test button and see if that
new button will submit the form. Other than that I think you are stuck with
either rebuilding the page piece by piece to see where it breaks, or
removing things piece by piece to see where it starts working again. Good
luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

amit.purohit said:
hi,

there is encryption used in that page, will that make a difference.

this code is used on form onsubmit() and then the server side event is
raised. even this code is not executed.

function on_login_submit() {
var psd_combo;
if( document.forms[0].pwd.value != "" )
{
psd_combo = hex_sha1(document.forms[0].pwd.value) +
document.forms[0].sha1_seed.value; document.forms[0].sha1_seed.value =
hex_sha1(psd_combo);
}
return true;
}




Ken Dopierala Jr. said:
Hmmm...Do you have any javascript that validates before submitting the page?
Without seeing any code or anything all I can suggest is deleting the page
from your project and then recreate it. Any chance that another page was
created in the same project with the same name? Maybe in a different
folder? Sometimes that causes problems although it is usually debugging
problems that that causes. Good luck! Ken.
 
thank u so much,

i tried these stuffs.

I made sample apps and it works fine.

may be i 'll just try, if u get some help, do let me know.

bye,
amit
Ken Dopierala Jr. said:
I don't know if the encryption will make a difference. But if your form
never submits it sounds more like a client-side issue because the server
isn't involved. You could try to create a new test button and see if that
new button will submit the form. Other than that I think you are stuck with
either rebuilding the page piece by piece to see where it breaks, or
removing things piece by piece to see where it starts working again. Good
luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

amit.purohit said:
hi,

there is encryption used in that page, will that make a difference.

this code is used on form onsubmit() and then the server side event is
raised. even this code is not executed.

function on_login_submit() {
var psd_combo;
if( document.forms[0].pwd.value != "" )
{
psd_combo = hex_sha1(document.forms[0].pwd.value) +
document.forms[0].sha1_seed.value; document.forms[0].sha1_seed.value =
hex_sha1(psd_combo);
}
return true;
}




Ken Dopierala Jr. said:
Hmmm...Do you have any javascript that validates before submitting the page?
Without seeing any code or anything all I can suggest is deleting the page
from your project and then recreate it. Any chance that another page was
created in the same project with the same name? Maybe in a different
folder? Sometimes that causes problems although it is usually debugging
problems that that causes. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

hi,

no the runat server tag is there.


Hi Amit,

Did the runat="server" attribute get removed from your asp:button server
control tag? Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

hi,

I have a very strange problem on my login Page. the Page was working
fine
a
few days back, but now does not generate post back events for
controls.
this
login page uses form based authentication.

Whenever the button is clicked, no event is raised, infact it doesnt
even
go
to the page_load as well. Events are registered and there is no
problem
with
the code because the same code is working fine on Windows XP machine.
The
machine which is giving problem is Windows 2000 Advanced server.

If I redirect the request forcefully to another page, everything works
perfectly fine across application, except this login.aspx.

its urgent,

thanks in advance.

Amit Purohit
(MCAD.NET)
 
It sounds like your event handler has become unattached from the event.
VS.net sometimes does this when you edit the html source of the page.
Make sure the sub is still bound to the event handler.

In C#, this line should be in the InitializeComponent sub.

this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);

and in VB the sub should look something like this.

Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As
EventArgs) Handles btnLogin.Click

Hope this helps!

Joel Cade, MCSD .Net, MCAD, MCP
Fig Tree Solutions, LLC
http://www.figtreesolutions.com
 
I agree with Joel. There have been times when my EventHandler got unattached
and gave me so much grief that I just added a note in my personal KB to first
check for EventHandlers, if events do not fire.
 
no this was the first thing that i had also checked out but this is not the
case.

what else can be the reason
 
ya i was able to dscover one thing, it is becoz of validators, any validator
on a page is creating the problems.

no message just gets blocked,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top