I have a ASP.NET Page
that contains a Shopping Cart UserControl
. Now, when user Click
on CheckoutButton
which is in UserControl
i want to redirect him to a page where customer information will be entered when CustomerID session is null
.
In UserControl:
protected void lnkCheckOut_Click1(object sender, EventArgs e)
{
if (Session["SalesCustomerID"] != null)
{
//CompleteOrder();
}
else
{
//Call here method of Parent Page
}
}
In Product.aspx.cs
In Product.aspx
page the UserControl
exists. this page also contains the MasterPage
.
public void CallCustomerForm()
{
//show/redirect to customer entry form
}
So, how to call a method which is in ParentControl
from UserControl
button click in asp.net using c#?