Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. after succesfull insert

after succesfull insert

Scheduled Pinned Locked Moved ASP.NET
databasequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karanba
    wrote on last edited by
    #1

    Hi.. I am using a formView and a data source to insert rows into a db. The defaultmode of formviev is "insert". After a successfull insert operation I want to show user only a succes message. But the default behavior is; formview show again insert new item. How could I change this? karanba

    F 1 Reply Last reply
    0
    • K karanba

      Hi.. I am using a formView and a data source to insert rows into a db. The defaultmode of formviev is "insert". After a successfull insert operation I want to show user only a succes message. But the default behavior is; formview show again insert new item. How could I change this? karanba

      F Offline
      F Offline
      FionaDM
      wrote on last edited by
      #2

      1. Add a label to your page to output the success message. 2. Raise the FormView iteminserted event. 3. Write an event handler - something like : protected void FormView1_Inserted(Object sender, FormViewInsertedEventArgs e) { // Hide the formview FormView1.Visible=false; Label1.text="Record successfully inserted"; } Remember too you can hide the Label to begin with within Properties. I find the visible attribute very useful. You might also like to look at the example at http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.formview.iteminserted.aspx Hope this helps. Maj

      K 1 Reply Last reply
      0
      • F FionaDM

        1. Add a label to your page to output the success message. 2. Raise the FormView iteminserted event. 3. Write an event handler - something like : protected void FormView1_Inserted(Object sender, FormViewInsertedEventArgs e) { // Hide the formview FormView1.Visible=false; Label1.text="Record successfully inserted"; } Remember too you can hide the Label to begin with within Properties. I find the visible attribute very useful. You might also like to look at the example at http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.formview.iteminserted.aspx Hope this helps. Maj

        K Offline
        K Offline
        karanba
        wrote on last edited by
        #3

        thaks..thats what a look for karanba

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups