나는 이 포함 된 ASP.NET Page
을 가지고 있습니다.UserControl
. 이제 Click
의 CheckoutButton
이 UserControl
인 경우 CustomerID 세션이 null
일 때 고객 정보가 입력되는 페이지로 리디렉션하려고합니다. UserControl을에서 asp.net의 UserControl에서 부모 메서드를 호출하는 방법?
:
protected void lnkCheckOut_Click1(object sender, EventArgs e)
{
if (Session["SalesCustomerID"] != null)
{
//CompleteOrder();
}
else
{
//Call here method of Parent Page
}
}
UserControl
가 존재 Product.aspx
페이지에서
Product.aspx.cs합니다. 이 페이지에는 MasterPage
도 포함되어 있습니다.
public void CallCustomerForm()
{
//show/redirect to customer entry form
}
그래서, asp.net using c#?
페이지에 가입하고 페이지를 유지할 수있는 사용자 컨트롤에 이벤트를 생성 할 어떤 이유 페이지의 특정 리디렉션 코드? http://stackoverflow.com/questions/6192739/how-do-i-raise-an-event-in-a-usercontrol-and-catch-it-in-mainpage – Malk