for (int i = 0; i < service.journeys.Count; i++)
{
var popup = new JourneyPopup();
// Fill out the form
popup.txtJourney.Text = service.journeys[i].journeyCode;
popup.txtDays.Text = service.journeys[i].daysOfWeek;
popup.txtDeparture.Text = service.journeys[i].departureTime;
popup.txtOrigin.Text = service.journeys[i].description;
popup.Show();
}
在我的JourneyPopup表單中我有一個名爲'done'的按鈕。我只需在點擊完成後重複執行for循環。我怎樣才能做到這一點?用戶輸入後迭代for循環
使用Click事件。 http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.click(v=vs.110).aspx –
@DROPtableusers當然,但我該如何暫停for循環它等待點擊事件? – jskidd3