Controlling when commit is performed in ASP.NET pages?

Controlling when commit is performed in ASP.NET pages?

Post by Alessandro Di Marc » Tue, 12 Feb 2002 06:57:14



What is the best technique, if any, to control when the commit is carried
out when using a WebForm connected to a dataset?
I mean:
Normally I create a dataset, perform my job and close the dataset thus I
have either commited or rollbacked the modification depending
on the rules..
Now..
What about if I want to let the user perform many modifications but I don't
want those changes to be permanent until he saves?
Many changes means that I want the user to be able to insert records, make
updates, deletes some other records.. and probably those
changes are span through multiple webforms...
For what is in my knowledge, I cannot cache the datasets to the client...
(is that possible when using a browser as your target?).
Shall I keep a copy on the server of the datasets modified between
roundtrips for each client? (agh...)

Thanks

**** ALEX ****

 
 
 

Controlling when commit is performed in ASP.NET pages?

Post by Derwin E. Whi » Thu, 14 Feb 2002 01:51:55


Heloo Alessandro,

I believe that best way to go about this would be to use a XML Data-Isand.  Below is a link to an MSDN article which describes XML Data-
Islands and how to embed them in HTML pages.  Let me know if you need any additional information.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmls...

Hope This Helps,
Derwin

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

Subject: Controlling when commit is performed in ASP.NET pages?
Date: Sun, 10 Feb 2002 22:57:14 +0100
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: h213-7-218.to.genie.it 213.213.7.218
Path: cpmsftngxa07!tkmsftngp01!tkmsftngp04
Xref: cpmsftngxa07 microsoft.public.dotnet.framework.aspnet:33949
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

What is the best technique, if any, to control when the commit is carried
out when using a WebForm connected to a dataset?
I mean:
Normally I create a dataset, perform my job and close the dataset thus I
have either commited or rollbacked the modification depending
on the rules..
Now..
What about if I want to let the user perform many modifications but I don't
want those changes to be permanent until he saves?
Many changes means that I want the user to be able to insert records, make
updates, deletes some other records.. and probably those
changes are span through multiple webforms...
For what is in my knowledge, I cannot cache the datasets to the client...
(is that possible when using a browser as your target?).
Shall I keep a copy on the server of the datasets modified between
roundtrips for each client? (agh...)

Thanks

**** ALEX ****

 
 
 

Controlling when commit is performed in ASP.NET pages?

Post by Alessandro Di Marc » Thu, 14 Feb 2002 02:51:20


Thank you Derwin,
I'll have a look into the document you have suggested.

Best Regards

**** ALEX ****



Quote:> Heloo Alessandro,

> I believe that best way to go about this would be to use a XML Data-Isand.

Below is a link to an MSDN article which describes XML Data-
Quote:> Islands and how to embed them in HTML pages.  Let me know if you need any

additional information.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmls...
xml_concepts2_2n03.asp

> Hope This Helps,
> Derwin

> This posting is provided "AS IS" with no warranties, and confers no
rights.

> --------------------

> Subject: Controlling when commit is performed in ASP.NET pages?
> Date: Sun, 10 Feb 2002 22:57:14 +0100
> Lines: 24
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

> Newsgroups: microsoft.public.dotnet.framework.aspnet
> NNTP-Posting-Host: h213-7-218.to.genie.it 213.213.7.218
> Path: cpmsftngxa07!tkmsftngp01!tkmsftngp04
> Xref: cpmsftngxa07 microsoft.public.dotnet.framework.aspnet:33949
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

> What is the best technique, if any, to control when the commit is carried
> out when using a WebForm connected to a dataset?
> I mean:
> Normally I create a dataset, perform my job and close the dataset thus I
> have either commited or rollbacked the modification depending
> on the rules..
> Now..
> What about if I want to let the user perform many modifications but I
don't
> want those changes to be permanent until he saves?
> Many changes means that I want the user to be able to insert records, make
> updates, deletes some other records.. and probably those
> changes are span through multiple webforms...
> For what is in my knowledge, I cannot cache the datasets to the client...
> (is that possible when using a browser as your target?).
> Shall I keep a copy on the server of the datasets modified between
> roundtrips for each client? (agh...)

> Thanks

> **** ALEX ****

 
 
 

Controlling when commit is performed in ASP.NET pages?

Post by Alessandro Di Marc » Thu, 14 Feb 2002 03:10:51


I read the XML Data-Island article.
Ok, I can pass an XML file from the server to the client togheter with any
other additional HTML tag...
Now if I catched up correctly your suggestion you are saying that using XML
Data Island I could send to the client
one ore more dataset... then I could work directly on them and after my job
is completed, I could pass back the resulting XML to the server..

In your experience, is this tecnique leading to download massive javascript
sources (to manipulate locally the XML file, sort, search etc..)
or it is "easily" feasible to stick to services on the server and leave as
much as possible the client "thin"?

Is it possible to pass to the server just modified XML records?

What about the .NET controls? are they designed for such approach?
I mean... Datagrids.. Datalists, and all other bindable controls would
complicate my life when using XML Data Island or they can easily work
like this?

Last.... is there any good example of a working solution using XML Data
Islands?.

Thanks again

**** ALEX ****



Quote:> Heloo Alessandro,

> I believe that best way to go about this would be to use a XML Data-Isand.

Below is a link to an MSDN article which describes XML Data-
Quote:> Islands and how to embed them in HTML pages.  Let me know if you need any

additional information.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmls...
xml_concepts2_2n03.asp

> Hope This Helps,
> Derwin

> This posting is provided "AS IS" with no warranties, and confers no
rights.

> --------------------

> Subject: Controlling when commit is performed in ASP.NET pages?
> Date: Sun, 10 Feb 2002 22:57:14 +0100
> Lines: 24
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

> Newsgroups: microsoft.public.dotnet.framework.aspnet
> NNTP-Posting-Host: h213-7-218.to.genie.it 213.213.7.218
> Path: cpmsftngxa07!tkmsftngp01!tkmsftngp04
> Xref: cpmsftngxa07 microsoft.public.dotnet.framework.aspnet:33949
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

> What is the best technique, if any, to control when the commit is carried
> out when using a WebForm connected to a dataset?
> I mean:
> Normally I create a dataset, perform my job and close the dataset thus I
> have either commited or rollbacked the modification depending
> on the rules..
> Now..
> What about if I want to let the user perform many modifications but I
don't
> want those changes to be permanent until he saves?
> Many changes means that I want the user to be able to insert records, make
> updates, deletes some other records.. and probably those
> changes are span through multiple webforms...
> For what is in my knowledge, I cannot cache the datasets to the client...
> (is that possible when using a browser as your target?).
> Shall I keep a copy on the server of the datasets modified between
> roundtrips for each client? (agh...)

> Thanks

> **** ALEX ****

 
 
 

Controlling when commit is performed in ASP.NET pages?

Post by Derwin E. Whi » Fri, 15 Feb 2002 23:51:59


Hello Alex,

You can search MSDN for a working solution using XML Data Islands.  Below is a block of code that shows how to
bind controls to an island.  You could easily expand on this to familiarize yourself with this technique.  Note that as
you add new meeting nodes new controls will be generated without you having to create them manually.  Cut and
paste this code into an ASP or ASPX file.

==================================
<HTML><HEAD></HEAD><TITLE></TITLE>
<BODY>
<XML ID="xmlMeetings">
<?xml version="1.0" ?>
<meetings>
<meeting>
<date>1/1/99</date>
<time>9:00</time>
<location>104</location>
</meeting>
<meeting>
<date>2/1/99</date>
<time>13:00</time>
<location>34</location>
</meeting>
<meeting>
<date>3/1/99</date>
<time>14:30</time>
<location>20</location>
</meeting>
</meetings>
</XML>
<table datasrc="#xmlMeetings" ID="Table1">
<tr>
<td><input type=text id="date" datafld="date"></td>
<td><input type=text id="time" datafld="time"></td>
<td><input type=text id="location" datafld="location"></td>
</tr>
</table>
</BODY>
</HTML>
==================================

I hope this helps.

Good Luck,

Derwin

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------


Subject: Re: Controlling when commit is performed in ASP.NET pages?
Date: Tue, 12 Feb 2002 19:10:51 +0100
Lines: 91
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: h213-7-122.to.genie.it 213.213.7.122
Path: cpmsftngxa08!cpmsftngxa07!tkmsftngp01!tkmsftngp07
Xref: cpmsftngxa08 microsoft.public.dotnet.framework.aspnet:34511
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

I read the XML Data-Island article.
Ok, I can pass an XML file from the server to the client togheter with any
other additional HTML tag...
Now if I catched up correctly your suggestion you are saying that using XML
Data Island I could send to the client
one ore more dataset... then I could work directly on them and after my job
is completed, I could pass back the resulting XML to the server..

In your experience, is this tecnique leading to download massive javascript
sources (to manipulate locally the XML file, sort, search etc..)
or it is "easily" feasible to stick to services on the server and leave as
much as possible the client "thin"?

Is it possible to pass to the server just modified XML records?

What about the .NET controls? are they designed for such approach?
I mean... Datagrids.. Datalists, and all other bindable controls would
complicate my life when using XML Data Island or they can easily work
like this?

Last.... is there any good example of a working solution using XML Data
Islands?.

Thanks again

**** ALEX ****



Quote:> Heloo Alessandro,

> I believe that best way to go about this would be to use a XML Data-Isand.

Below is a link to an MSDN article which describes XML Data-
Quote:> Islands and how to embed them in HTML pages.  Let me know if you need any

additional information.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmls...
xml_concepts2_2n03.asp

> Hope This Helps,
> Derwin

> This posting is provided "AS IS" with no warranties, and confers no
rights.

> --------------------

> Subject: Controlling when commit is performed in ASP.NET pages?
> Date: Sun, 10 Feb 2002 22:57:14 +0100
> Lines: 24
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600

> Newsgroups: microsoft.public.dotnet.framework.aspnet
> NNTP-Posting-Host: h213-7-218.to.genie.it 213.213.7.218
> Path: cpmsftngxa07!tkmsftngp01!tkmsftngp04
> Xref: cpmsftngxa07 microsoft.public.dotnet.framework.aspnet:33949
> X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

> What is the best technique, if any, to control when the commit is carried
> out when using a WebForm connected to a dataset?
> I mean:
> Normally I create a dataset, perform my job and close the dataset thus I
> have either commited or rollbacked the modification depending
> on the rules..
> Now..
> What about if I want to let the user perform many modifications but I
don't
> want those changes to be permanent until he saves?
> Many changes means that I want the user to be able to insert records, make
> updates, deletes some other records.. and probably those
> changes are span through multiple webforms...
> For what is in my knowledge, I cannot cache the datasets to the client...
> (is that possible when using a browser as your target?).
> Shall I keep a copy on the server of the datasets modified between
> roundtrips for each client? (agh...)

> Thanks

> **** ALEX ****

 
 
 

1. Controlling when commit is performed in ASP.NET pages?

What is the best technique, if any, to control when the commit is carried
out when using a WebForm connected to a dataset?
I mean:
Normally I create a dataset, perform my job and close the dataset thus I
have either commited or rollbacked the modification depending
on the rules..
Now..
What about if I want to let the user perform many modifications but I don't
want those changes to be permanent until he saves?
Many changes means that I want the user to be able to insert records, make
updates, deletes some other records.. and probably those
changes are span through multiple webforms...
For what is in my knowledge, I cannot cache the datasets to the client...
(is that possible when using a browser as your target?).
Shall I keep a copy on the server of the datasets modified between
roundtrips for each client? (agh...)

Thanks

**** ALEX ****

2. Question to (Win) FontMonger users: T1 -> Speedo

3. load a ASP.net page inside exiting asp.net page

4. HP OpenMail Contract-Connecticut-Long term

5. Why am I not able to control the session timeout in ASP.NET???

6. Canonical CNAMEs?

7. ASP.NET C# How to perform scheduled tasks

8. Creating Shareware fonts

9. Is it possible to use ASP.NET / c# etc to perform server side instructions like ActiveX?

10. A Commit is not a Commit!!

11. Page.IsValid performs a postback for a toolbarbutton web control

12. Problem Porting asp.net page to vs.net pages

13. Calling ASP.NET pages from other version of ASP pages in IIS 5