Re: NullReferenceException was unhandled (passing array of string)
A few possibilities:
1. MF.GetFullMoonDates is returning a string array with one or more null elements
2. The actual control for (TextBox)this.Controls["txtFullMoonDates" + iCount.ToString()] is not found on the form.
Either tb or dtMoonDates[iCount] is null, you need to determine which one, then why.
Re: NullReferenceException was unhandled (passing array of string)
Originally Posted by CGKevin
A few possibilities:
1. MF.GetFullMoonDates is returning a string array with one or more null elements
2. The actual control for (TextBox)this.Controls["txtFullMoonDates" + iCount.ToString()] is not found on the form.
Either tb or dtMoonDates[iCount] is null, you need to determine which one, then why.
Turns out the TextBox name was the problem. "txtFullMoonDates" should be "txtFullMoonDate".
Bookmarks