我有这个问题...试图弄清楚这一点,并搜索出来,但那里的解决方案但无法解决这个问题,一些回复会有所帮助。谢谢
foreach (RepeaterItem item in Rptr.Items)
{
Label LblIncdntID = (Label)item.FindControl("LblIncdntID");
Guid g = new Guid(LblIncdntID.Text);
_IncidentType.INCIDENTREPORT_ID = INCIDENTREPORT_ID;
_IncidentType.INCIDENTREPORT_INCIDENTTYPE_ID = Guid.NewGuid();
_IncidentType.INCIDENTTYPEID = g ;
db.INCIDENTREPORT_INCIDENTTYPEs.InsertOnSubmit(_IncidentType);
db.SubmitChanges();
}