views:

117

answers:

1

I lost a week of time on this. I wanted to use a LinkButton instead of the standard asp button so I could attached a SkinID to it that I use for link buttons. When using the linkbutton:

<asp:LinkButton ID="LinkButton1" runat="server" CommandName="Login" SkinID="loginButton" ValidationGroup="rgtLogin" />

the anonymous cookie is never deleted and the Profile_OnMigrateAnonymous is called endlessly. And since the cookie is never removed, my profile is never set to the correct user.

I changed this back to the regular asp button and it works like it should. Does anybody know why I can't use the above code for the Login command on the Login control? I need know to figure out how to apply my skin to a regular button.

+2  A: 

Using a LinkButton works for me in our Login control. However, I noticed that your LinkButton has no text. I've often-times had problems with links working properly when they're completely empty. Does your LinkButton work when filled with text, even if it's an &nbsp;?

Jacob
Very weird - I added text to the linkbutton and it started working normally. However, I don't want text, so I removed it. And it still worked. Works in all browsers now. I wish I could explain why weird things like this happen and throw me off! Thanks for the comment.
Scott