I want to validate some data in a SharePoint List. So I've created a button to a pop-up verify.aspx page. On the verify page I list all the items that match the orginal form (should only return 1 item). The user then selects the item on the verify page and the details are updated on the original SP form.
In the verify page, rather than add a DataFormWebPart which is difficult to edit i've added a DataGrid. The problem is that I need to send the items of that row to javascript function. This is where I'm having a problem. I've added a template item and within this a asp button. When I dont add <%# Eval("CustomerName") %> within the () of populateparent the form renders. When I add <%# Eval("CustomerName") %> I get an error - Server Tag not well formed.
Could anyone assist with the code below pls
<asp:GridView runat="server" id="GridView1" AutoGenerateColumns="False" DataSourceID="SqlDataSource2">
<Columns>
<asp:boundfield DataField="Id" HeaderText="Id" SortExpression="Id">
</asp:boundfield>
<asp:boundfield DataField="CustomerName" HeaderText="CustomerName" SortExpression="CustomerName">
</asp:boundfield>
<asp:boundfield DataField="CustomerAddress" HeaderText="CustomerAddress" SortExpression="CustomerAddress">
</asp:boundfield>
<asp:boundfield DataField="CustomerDOB" HeaderText="CustomerDOB" SortExpression="CustomerDOB">
</asp:boundfield>
<asp:templatefield>
<ItemTemplate>
<asp:Button runat="server" Text="Button" id="Button2" CommandArgument='<%# Eval("CustomerName") %>' OnClientClick="PopulateParent();" ></asp:Button>
</ItemTemplate>
</asp:templatefield>
</Columns>
</asp:GridView>