Object reference not set to an instance of an object Message with String Array
<p>I have the following code:</p>

<pre><code>protected void btnSave_Click(object sender, EventArgs e)
{
    StarBusModel.BookingDetail1 objBooking = new StarBusModel.BookingDetail1();
    objBooking.TourID = tourID;
    objBooking.Name = txtName.Text;
    objBooking.Phone = txtPhone.Text;
    objBooking.Amount = Convert.ToDecimal(Request.Form[txtAmount.ClientID]);


    string []  seats = Request.Form[txtSeatNo.ClientID].Split(new char[] {','});
    for (int i = 0; i &lt; seats.Length; i++)
            objBooking.SeatDetails.Add(new StarBusModel.SeatDetail1() {SeatID = Convert.ToInt32(seats[i])});
    objEntities.BookingDetail1.AddObject(objBooking);        
    objEntities.SaveChanges();
    BindSeats();
}
</code></pre>

<p>I get the error </p>

<p><code>System.NullReferenceException: Object reference not set to an instance of an object.</code></p>

<p>at the following code:</p>

<pre><code>string []  seats = Request.Form[txtSeatNo.ClientID].Split(new char[] {','});
</code></pre>

<p>Please advise where I am wrong. I searched for various answers but cannot pinpoint where I am wrong. </p>
