Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting/Updating/Deleting DetailsView w/o datasource controls?

Status
Not open for further replies.

satchi

Programmer
Sep 15, 2003
104
US
Hi, I have this sql server db where I want to update, create new records, and delete records from a DetailsView, without the use of asp's datasource controls. I have been reading that I need to manually write code to do these in the DetailsView1_ItemInserting, _ItemUpdating, _ItemDeleting, and _ModeChanging events.

Can anyone help me get started, namely the updating portion? I cant seem to find any tutorials related to creating w/o the use of datasource controls.

Code:
protected void dvProducts_ModeChanging(object sender, DetailsViewModeEventArgs e)
    {
        dvProducts.ChangeMode(e.NewMode);
        BindView();
    }

I think I got the ModeChanging event done, but I'm stuck on updating, and inserting...

Any suggestions? Thanks in advance..
 
you can look for samples of these things with the datagrid. those samples wont use the datasource controls and will have what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top