I have a request form that users can request books from one author or many authors. When there is one author, the update works. When there are many authors or genres the update does not work.
The update happens with an objectdatasource like this on the .aspx page like this:
<asp:ObjectDataSource runat="server" ID="odsAuthorsDoc" SelectMethod="GetAuthorsDocByID" TypeName="Library.Media.AuthorDoc" UpdateMethod="UpdateAuthorsDoc">
<SelectParameters>
<asp:QueryStringParameter Name="RequestID" QueryStringField="id" Type="Int32" />
</SelectParameters>
<UpdateParameters>
<asp:QueryStringParameter Name="AuthorDocID" Type="Int32" QueryStringField="id" />
<asp:ProfileParameter Name="Editor" PropertyName="RequestD" Type="Int32" />
</UpdateParameters>
This is how the .cs page looks:
public static void UpdateauthorDoc(Int32 authorDocID, Int32 Editor, DateTime RequestDate, DateTime PickupTime, String Author, String Genre)
{
authorDoc old = authorDoc.GetauthorDocByID(authorDocID);
if (old.RequestDate != StartDate) requestItem.UpdateField(authorDocID, Editor, "RequestDate", RequestDate.ToShortDateString());
if (old.PickupTime != Duration) requestItem.UpdateField(authorDocID, Editor, "PickupTime", PickupTime.ToString());
if (old.Author != Author) requestItem.UpdateField(authorDocID, Editor, "Author", Author);
if (old.Genre != Genre) requestItem.UpdateField(authorDocID, Editor, "Genre", Genre);
}
How do I modify the code on the .cs page so I can update a string of authors names into the SQL XML field?