Link to home
Start Free TrialLog in
Avatar of JessyEzzy
JessyEzzy

asked on

Error in linkbutton event

I have a form with two panels, one panel contains fields for user registeration the other for sigining in, initially the registration panel is hidden, I have a linkbutton in the other panel to click on it in case of a new user, all I do in its click event is to hide the sign in panel & show the register panel

protected void registerBtn_Click(object sender, EventArgs e)
    {
        pnlSignIn.Visible = false;
        pnlRegister.Visible = true;
    }

the problem is when I click the button I receive the following error

Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

What's that supposed to mean?
I tried adding this  enableEventValidation="true"  to the page directive, but when I did that there was no error but the button now has to be clicked twice.

Any help please.
Avatar of rodmjay
rodmjay
Flag of United States of America image

Try putting a breakpoint on the pages init event.  Does the code break before or after this?
Avatar of JessyEzzy
JessyEzzy

ASKER

I can't debug, it's giving me an error that debugging failed cos Windows Integrated Authentication is not enabled, how would I enable it?
I figured out what was causing that error, there was an extra <form></from> tag in the page, once I removed them, everything went fine :)

Sorry for disturbance and thanks alot for trying to help.

Cheers.
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial