Passing a string into .cs page

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">
            <asp:QueryStringParameter Name="RequestID" QueryStringField="id" Type="Int32" />
            <asp:QueryStringParameter Name="AuthorDocID" Type="Int32" QueryStringField="id" />
            <asp:ProfileParameter Name="Editor" PropertyName="RequestD" Type="Int32" />

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?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!