Does anyone know why I would get this error when adding '<%# %>' around my sqlDataSource's InsertCommand?
The SelectCommand works just fine with the '<%# %>'.
When I remove the above from the InsertCommand, it works fine, but I need it to fetch a value from parent Listview.
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:VmedIntranetConnectionString %>"
SelectCommand='<%# "SELECT * FROM [Project_Detail] Where Project_Master_Key = " + Eval("Project_Master_Key").ToString() %>'
InsertCommand='<%# "INSERT INTO [Project_Detail] ([Project_Master_Key]) VALUES (2)" %>'>
Here is my full code, maybe it makes more sense. It is two nested ListViews, the second one has the InsertCommand. It receives the parent Key, and suppose to create
View Complete Post