On a page .aspx ( detail_page.aspx ) I have a code like this, now lower add an HTML form with action to the same page.
How can I know if the page is receiving the post or NOT?
The goal is if you receive the post execute a code and if you do not receive it execute this code that I already have:
<%
int restaurantId = 0;
if (!IsPostBack)
{
if(Session["idrestaurant"]!= null)
{
int.TryParse(Session["idrestaurant"].ToString(), out restaurantId);
}
hfRestaurantId.Value = restaurantId.ToString();//Set restaurantId
}
SaborWebApp.restaurant rest = new SaborWebApp.SaborEntities().restaurant.Where(a => a.RestaurantID == restaurantId).FirstOrDefault();
%>
Html form
<form method="post" action="../Delivery/detail_page.aspx" name="review" id="review" class="popup-form" />
<input name="name_review" id="name_review" type="text" placeholder="Name" class="form-control form-white" />
<input type="submit" value="Submit" class="btn btn-submit" id="submit-review"/>
</form>