detailsview asp.net 2 and insert confirmation

T

TdarTdar

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
 
K

Kevin Yu [MSFT]

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."
 
S

Steven Cheng[MSFT]

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=?=" <[email protected]>
| Subject: detailsview asp.net 2 and insert confirmation
| Date: Fri, 4 Nov 2005 09:51:05 -0800
| Lines: 16
| Message-ID: <[email protected]>
| 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
|
|
 
T

TdarTdar

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.
 
S

Steven Cheng[MSFT]

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=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: detailsview asp.net 2 and insert confirmation
| Date: Sun, 6 Nov 2005 09:59:15 -0800
| Lines: 94
| Message-ID: <[email protected]>
| 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=?=" <[email protected]>
| > | Subject: detailsview asp.net 2 and insert confirmation
| > | Date: Fri, 4 Nov 2005 09:51:05 -0800
| > | Lines: 16
| > | Message-ID: <[email protected]>
| > | 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
| > |
| > |
| >
| >
|
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top