detailsview asp.net 2 and insert confirmation

Discussion in 'ASP .Net Web Controls' started by TdarTdar, Nov 4, 2005.

  1. TdarTdar

    TdarTdar Guest

    Hi,
    using a detailsview and sql, setting the details view to insert as the
    primary
    view, after someone inserts the data they want to I would like to do something

    eather A:

    have that page show "Your Request has been Processed"

    or B:
    Rediret them to another page

    after they click the insert button on the detailsview asp.net 2 control.

    Tdar
     
    TdarTdar, Nov 4, 2005
    #1
    1. Advertising

  2. Hi Tdar,

    We have reviewed this issue and are currently researching on it. We will
    update you ASAP. Thanks for your patience!

    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."
     
    Kevin Yu [MSFT], Nov 5, 2005
    #2
    1. Advertising

  3. Hi Tdar,

    Welcome to ASPNET newsgroup.
    From your description , you're using the DetailsView control to perform
    insert operation (set detaulMode as "Insert") and is wondering how to make
    a notify info or redirect the user to another page after successfully
    inserted a new record, yes?

    As for this, I think we can consider using the DetailsView control's
    ItemInserted event, this event is fired after a new record is successfully
    inserted. So we can just put or post processing code in the ItemInserted
    event handler like:


    protected void DetailsView1_ItemInserted(object sender,
    DetailsViewInsertedEventArgs e)
    {
    lblMessage.Text = "You've successfully inserted the new record!";

    // or Response.Redirect( new page url...);
    }

    Hope helps. Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)



    --------------------
    | Thread-Topic: detailsview asp.net 2 and insert confirmation
    | thread-index: AcXhaFP/Ng9qnjQuShCKLQA62gCXSQ==
    | X-WBNR-Posting-Host: 24.73.223.27
    | From: "=?Utf-8?B?VGRhclRkYXI=?=" <>
    | Subject: detailsview asp.net 2 and insert confirmation
    | Date: Fri, 4 Nov 2005 09:51:05 -0800
    | Lines: 16
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:11684
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | Hi,
    | using a detailsview and sql, setting the details view to insert as the
    | primary
    | view, after someone inserts the data they want to I would like to do
    something
    |
    | eather A:
    |
    | have that page show "Your Request has been Processed"
    |
    | or B:
    | Rediret them to another page
    |
    | after they click the insert button on the detailsview asp.net 2 control.
    |
    | Tdar
    |
    |
     
    Steven Cheng[MSFT], Nov 6, 2005
    #3
  4. TdarTdar

    TdarTdar Guest

    Ah ok,
    Humm much like before, so doing it in vb was like this:(and this works
    already thanks)

    Protected Sub DetailsView1_ItemInserted(ByVal Sender As Object, ByVal e As
    System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles
    DetailsView1.ItemInserted

    Me.Label1.Text = "We have recived your request, thank you."
    End Sub

    anyways it works, Thanks.


    "Steven Cheng[MSFT]" wrote:

    > Hi Tdar,
    >
    > Welcome to ASPNET newsgroup.
    > From your description , you're using the DetailsView control to perform
    > insert operation (set detaulMode as "Insert") and is wondering how to make
    > a notify info or redirect the user to another page after successfully
    > inserted a new record, yes?
    >
    > As for this, I think we can consider using the DetailsView control's
    > ItemInserted event, this event is fired after a new record is successfully
    > inserted. So we can just put or post processing code in the ItemInserted
    > event handler like:
    >
    >
    > protected void DetailsView1_ItemInserted(object sender,
    > DetailsViewInsertedEventArgs e)
    > {
    > lblMessage.Text = "You've successfully inserted the new record!";
    >
    > // or Response.Redirect( new page url...);
    > }
    >
    > Hope helps. Thanks,
    >
    > Steven Cheng
    > Microsoft Online Support
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    >
    >
    > --------------------
    > | Thread-Topic: detailsview asp.net 2 and insert confirmation
    > | thread-index: AcXhaFP/Ng9qnjQuShCKLQA62gCXSQ==
    > | X-WBNR-Posting-Host: 24.73.223.27
    > | From: "=?Utf-8?B?VGRhclRkYXI=?=" <>
    > | Subject: detailsview asp.net 2 and insert confirmation
    > | Date: Fri, 4 Nov 2005 09:51:05 -0800
    > | Lines: 16
    > | Message-ID: <>
    > | MIME-Version: 1.0
    > | Content-Type: text/plain;
    > | charset="Utf-8"
    > | Content-Transfer-Encoding: 7bit
    > | X-Newsreader: Microsoft CDO for Windows 2000
    > | Content-Class: urn:content-classes:message
    > | Importance: normal
    > | Priority: normal
    > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
    > | Xref: TK2MSFTNGXA01.phx.gbl
    > microsoft.public.dotnet.framework.aspnet.webcontrols:11684
    > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    > |
    > | Hi,
    > | using a detailsview and sql, setting the details view to insert as the
    > | primary
    > | view, after someone inserts the data they want to I would like to do
    > something
    > |
    > | eather A:
    > |
    > | have that page show "Your Request has been Processed"
    > |
    > | or B:
    > | Rediret them to another page
    > |
    > | after they click the insert button on the detailsview asp.net 2 control.
    > |
    > | Tdar
    > |
    > |
    >
    >
     
    TdarTdar, Nov 6, 2005
    #4
  5. Thanks for your response Tdar,

    If there're any further question or anything else we can help, please feel
    free to post here.
    Thanks,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    --------------------
    | Thread-Topic: detailsview asp.net 2 and insert confirmation
    | thread-index: AcXi+8zWJnYxnOaRT5mkOhq/peO/RQ==
    | X-WBNR-Posting-Host: 65.35.95.187
    | From: "=?Utf-8?B?VGRhclRkYXI=?=" <>
    | References: <>
    <>
    | Subject: RE: detailsview asp.net 2 and insert confirmation
    | Date: Sun, 6 Nov 2005 09:59:15 -0800
    | Lines: 94
    | Message-ID: <>
    | MIME-Version: 1.0
    | Content-Type: text/plain;
    | charset="Utf-8"
    | Content-Transfer-Encoding: 7bit
    | X-Newsreader: Microsoft CDO for Windows 2000
    | Content-Class: urn:content-classes:message
    | Importance: normal
    | Priority: normal
    | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | Xref: TK2MSFTNGXA01.phx.gbl
    microsoft.public.dotnet.framework.aspnet.webcontrols:11722
    | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    |
    | Ah ok,
    | Humm much like before, so doing it in vb was like this:(and this works
    | already thanks)
    |
    | Protected Sub DetailsView1_ItemInserted(ByVal Sender As Object, ByVal e
    As
    | System.Web.UI.WebControls.DetailsViewInsertedEventArgs) Handles
    | DetailsView1.ItemInserted
    |
    | Me.Label1.Text = "We have recived your request, thank you."
    | End Sub
    |
    | anyways it works, Thanks.
    |
    |
    | "Steven Cheng[MSFT]" wrote:
    |
    | > Hi Tdar,
    | >
    | > Welcome to ASPNET newsgroup.
    | > From your description , you're using the DetailsView control to perform
    | > insert operation (set detaulMode as "Insert") and is wondering how to
    make
    | > a notify info or redirect the user to another page after successfully
    | > inserted a new record, yes?
    | >
    | > As for this, I think we can consider using the DetailsView control's
    | > ItemInserted event, this event is fired after a new record is
    successfully
    | > inserted. So we can just put or post processing code in the
    ItemInserted
    | > event handler like:
    | >
    | >
    | > protected void DetailsView1_ItemInserted(object sender,
    | > DetailsViewInsertedEventArgs e)
    | > {
    | > lblMessage.Text = "You've successfully inserted the new
    record!";
    | >
    | > // or Response.Redirect( new page url...);
    | > }
    | >
    | > Hope helps. Thanks,
    | >
    | > Steven Cheng
    | > Microsoft Online Support
    | >
    | > Get Secure! www.microsoft.com/security
    | > (This posting is provided "AS IS", with no warranties, and confers no
    | > rights.)
    | >
    | >
    | >
    | > --------------------
    | > | Thread-Topic: detailsview asp.net 2 and insert confirmation
    | > | thread-index: AcXhaFP/Ng9qnjQuShCKLQA62gCXSQ==
    | > | X-WBNR-Posting-Host: 24.73.223.27
    | > | From: "=?Utf-8?B?VGRhclRkYXI=?=" <>
    | > | Subject: detailsview asp.net 2 and insert confirmation
    | > | Date: Fri, 4 Nov 2005 09:51:05 -0800
    | > | Lines: 16
    | > | Message-ID: <>
    | > | MIME-Version: 1.0
    | > | Content-Type: text/plain;
    | > | charset="Utf-8"
    | > | Content-Transfer-Encoding: 7bit
    | > | X-Newsreader: Microsoft CDO for Windows 2000
    | > | Content-Class: urn:content-classes:message
    | > | Importance: normal
    | > | Priority: normal
    | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
    | > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
    | > | Xref: TK2MSFTNGXA01.phx.gbl
    | > microsoft.public.dotnet.framework.aspnet.webcontrols:11684
    | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
    | > |
    | > | Hi,
    | > | using a detailsview and sql, setting the details view to insert as
    the
    | > | primary
    | > | view, after someone inserts the data they want to I would like to do
    | > something
    | > |
    | > | eather A:
    | > |
    | > | have that page show "Your Request has been Processed"
    | > |
    | > | or B:
    | > | Rediret them to another page
    | > |
    | > | after they click the insert button on the detailsview asp.net 2
    control.
    | > |
    | > | Tdar
    | > |
    | > |
    | >
    | >
    |
     
    Steven Cheng[MSFT], Nov 7, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William LaMartin

    DetailsView edit and insert row widths

    William LaMartin, Jan 22, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    12,431
    mrpink
    Mar 29, 2009
  2. cannontrodder
    Replies:
    1
    Views:
    733
    cannontrodder
    Jul 25, 2006
  3. eagle

    Insert & Insert/Repeat buttons in a detailsview

    eagle, Jul 12, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    1,060
    eagle
    Jul 12, 2007
  4. The_ShotSpotter_Team

    How to access controls in Edit and Insert templates of DetailsView

    The_ShotSpotter_Team, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    199
    Brock Allen
    Aug 30, 2005
  5. Feege
    Replies:
    0
    Views:
    463
    Feege
    Dec 20, 2005
Loading...

Share This Page