[Last Call] Learn how to a build a cloud-first strategyRegister Now


Details view with autogenerate equal false

Posted on 2007-07-24
Medium Priority
Last Modified: 2007-07-24
I am trying to use a non auto generated insert button in a details view and it isn't working
I have posted both my objectdatasource and the detailsview insert template. The page refeshes but nothing is added to the db. Any suggestions? Everything was working until I didn't auto generate the insert button.
'object data source
    <asp:ObjectDataSource ID="ods1" runat="server" SelectMethod="getDS" DeleteMethod="Delete" InsertMethod="Add" UpdateMethod="SaveGrid"
'details view insert
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Add"  ValidationGroup="InsertGroup" Text="Insert"></asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
Question by:NickMalloy
1 Comment
LVL 16

Accepted Solution

TSmooth earned 1000 total points
ID: 19560245
You need to make CommandName="Add" into CommandName="Insert" if you want to use the default processing of the detailsview insert. Otherwise, you'll have to process the commandname of "Add" and do the insert logic manually.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question