- , , , ... , . XML. LINQ , findcontrol datarow, Linq XML, LINQ to Objects. rp , cbIgnore - , , , .
Dim doc As New XDocument( _
New XDeclaration("1.0", "ISO-8859-1", "true"), _
New XElement("Schedule_Import", _
From c As RepeaterItem In rp.Items _
Where (c.ItemType = ListItemType.Item Or c.ItemType = ListItemType.AlternatingItem) _
AndAlso DirectCast(c.FindControl("cbIgnore"), HtmlInputCheckBox).Checked = False _
Select New XElement("activity", _
New XElement("code", DirectCast(c.FindControl("txtAC"), TextBox).Text), _
New XElement("starttime", DirectCast(c.FindControl("dtfStart"), DateTimeField).SelectedDateTime), _
New XElement("endtime", DirectCast(c.FindControl("dtfEnd"), DateTimeField).SelectedDateTime), _
New XElement("description", DirectCast(c.FindControl("txtTitle"), TextBox).Text))))