나는 로그인 컨트롤을 사용하고 있었지만 약간 더 사용자 지정된 모양을 원했기 때문에 사용자 이름과 비밀번호로 텍스트 필드를 사용했습니다. 그리고 "로그인"버튼에 ImageButton을 사용하려고 시도했지만 로그인에 "onAuthenticate"속성이 있지만 ImageButton에 로그인하지 않은 것처럼 보입니다. 내 ImageButton에서 "onAuthenticate"기능을 사용할 수있는 방법이 있습니까?ASP.NET의 일반 버튼에 대한 onAuthenticate?
하여 ImageButton :
<asp:ImageButton ID="LoginButton" runat="server" CommandName="Login" ValidationGroup="Login"
ImageUrl="~/Images/loginExtranet.png"/>
나는 다음과 같은 functon 호출 할 필요가 있기 때문에 이것은 중요하다
protected void LoginExtranet_Authenticate(object sender, AuthenticateEventArgs e)
{
// Check Database for username and password
// ....
// if correct set e.Authenticated = true
// redirect to destination
}
하여 ImageButton 컨트롤은이 함수를 호출 할 수있는 속성이 없습니다를, Login 컨트롤을 수행합니다.
그리고 사용자를 정확히 어떻게 인증 하시겠습니까? – Stilgar
@Stilgar 편집을했습니다. – NomenNescio
자, 내가 말하는 것은 당신이 로그인 컨트롤을 사용하고 있지만 당신이 그것을 자신의 커스텀 컨트롤로 옮겼다는 것입니다. CSS를 통해 컨트롤을 스타일링 해 보았습니까? –