Hi,
I've written some code that seems to throw an error after the second or third time this specific page is clicked on. So if I go to the page the first time, the page loads up fine, I'm able to click the submit button and my data is written to the database (sharepoint). But upon clicking on the same link a second, third, etc time, I get a 'Value did not fall within the expected range' error. Then after some time the error will go away. I really can't figure out what is going on. Can you take a look at my code and just see if anything jumps out?
thank you,
#region
///
#endregion
using
namespace
{
System.Collections.Generic.
alllist =
}
btnCheckInContractor =
btnCheckInContractor.CausesValidation =
btnCheckInContractor.CssClass =
btnCheckInContractor.Text =
btnCheckInContractor.Click +=
PlaceHolder1.Controls.Add(btnCheckInContractor);
tblMain.BorderStyle =
tblMain.Width = 750;
trn =
td1 =
td2 =
td3 =
trn.Cells.Add(td1);
trn.Cells.Add(td2);
trn.Cells.Add(td3);
td1.Font.Size = 8;
td1.Font.Bold =
label.Text=
td1.Controls.Add(label);
td2.Font.Size = 8;
td2.Font.Bold =
Twolabel.Text =
td2.Controls.Add(Twolabel);
td3.Font.Size = 8;
td3.Font.Bold =
ThreeLabel.Text =
td3.Controls.Add(ThreeLabel);
tblMain.Rows.Add(trn);
txtVendor =
txtName =
txtExpDate =
txtVendor = item[
txtName = item[
txtExpDate = item[
contractorInfo =
alllist.Add(chk, contractorInfo);
chk.Text = txtName;
tr =
tr.Cells.Add(td1);
tr.Cells.Add(td2);
tr.Cells.Add(td3);
td1.Controls.Add(chk);
td2.Text = txtVendor;
td2.VerticalAlign =
td3.Text = txtExpDate;
td3.VerticalAlign =
tblMain.Rows.Add(tr);
PlaceHolder1.Controls.Add(tblMain);
tblMain.Dispose();
spWebContractor.AllowUnsafeUpdates =
strVendor = alllist[theItem].Key;
strName = alllist[theItem].Value;
spListCheckInNewItem[
spListCheckInNewItem.Update();
strVendor =
strName =
{}
{ }
Response.Redirect(
});