public partial class MainBookingform : System.Web.UI.Page
{
static int numberOfBeachBookingInteger = 0;
static int numberOfBushBookingInteger = 0;
static int totalRevenueInteger = 0;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["beachBach"] != null)
{
numberOfBeachBookingInteger += 1;
beachBachLabel.Text = numberOfBeachBookingInteger.ToString();
}
if (Session["beachBach"] != null)
{
numberOfBushBookingInteger += 1;
bushBachLabel.Text = numberOfBushBookingInteger.ToString();
}
}
}
嗨,我想在调试程序时看到这些整数从“0”开始。但是,我分配给这些整数的这些标签总是从“1”开始
请帮忙!