当程序员输入页面加载方法时,我在此代码中有aspx.cs代码,检查条件后,我想跳到这里:
DataTable dt = flight.InsertBooking(objBook.Id,Convert.ToInt32(ViewState [“totalFare”]),objBook.ReCommission,objBook.Commission,title,fname,lname,phone,phone,email,address,“ - “,” - “,country,pincode,objBook.BookingId,objBook.PnrNo,bookrequest.Source.ToString(),objBook.Msg,bookrequest.FareRule [0] .DepartureDate,objBook.MarkUp,objBook.AdminMarkUp,bookrequest.Origin ,bookrequest.Destination,bookrequest.PromotionalPlanType.ToString(),bookrequest.FareType,bookrequest.Remarks,bookrequest.SessionId,isoneway,Convert.ToString(ViewState [“TrnId”]),FlType,objBook.BookingStatus,objBook.Status,passenger ,Request.UserHostAddress); if(dt.Rows.Count> 0)
答案 0 :(得分:1)
将代码包装在一个函数中然后调用它