views:

73

answers:

2

I'd like to customize the login error message that visitors get when their login attempt fails. In ASP.NET, you'd override the Login_LoginError event, as described in this 4GuysFromRolla article.

Anyone know how to do this in ASP.NET MVC?

Thanks in advance!

A: 

Are you using standard ASP.NET login control? If this so you can easily remove it and use login controls from MVC Membership Starter Kit (it's for Preview 5 but can be easily converted to RC) or write your own. And using them you can customize error message via CSS.

zihotki
Thanks for pointing out the MVC Membership Starter Kit. It's pretty much identical to MVC RC. But after reviewing things, I've managed to rewrite the login code to let me throw some friendly messages. Thanks!
Chad
A: 

When I wrote this question, I wasn't thinking straight. To accomplish what I asked, you simply write the logic into the Login action. Really simple... ;)

Chad