Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6540465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:58:57+00:00 2026-05-25T10:58:57+00:00

I have a form view which is inserting data into a sql-server-2008 database. instead

  • 0

I have a form view which is inserting data into a sql-server-2008 database. instead of using the formview’s functionality of entering data into the database, i would like it to use my own data access layer. since i am a beginner at asp.net i do not understand how to intercept the INSERT and do my own insert. i need to grab text out of the text boxes and process the data myself.

question: at which point do i intercept the INSERT (after the user clicks on the INSERT link)? where exactly do i add my own code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:58:57+00:00Added an answer on May 25, 2026 at 10:58 am

    RECOMMENDED SOLUTION

    I think you’ve gone a little beyond the scope of the control if you need to control the actual insert command. At this point, you should move to just handling a button click event and invoke your DAL directly, from such a control as a <asp:Button/> and perhaps use another UI control if you are dependent on the FormView control to present the UI.

    THE BELOW IS A HACK – Only do as a last resort

    However, you could ‘hack’ the FormView control by attaching to the ItemInserting event, and then insert via your DAL. Then you would simply “Cancel” the insert by setting the Cancel property to true:

    void EmployeeFormView_ItemInserting(Object sender, FormViewInsertEventArgs e)
    {
         // Do Stuff
         e.Cancel = true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view which contains a form, the form posts and the data
I have a form which uploads multiple file fields into a db using codeigniter.
I have a usercontrol to provide a data grid view and using it in
I have a view which queries a model to populate a form: class AddServerForm(forms.Form):
I have an SqlDataSource attached to a FormView which is used for inserting/updating, which
I have a form in a view which performs ajax partial processing for autocompletion
Greetings! I have a DropDownList within a FormView which are bound to XmlDataSources: <asp:FormView
I have form area in my view. If I click button A , I
I have this form in my view: <!-- Bug (extra 'i') right here-----------v -->
I have a simple form on a view page, implemented as a user control,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.