开发者

Why can't I use a LinkButton in the ASP.NET login control for the Login button?

开发者 https://www.devze.com 2022-12-19 08:30 出处:网络
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:

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开发者_StackOverflow="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.


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;?

0

精彩评论

暂无评论...
验证码 换一张
取 消