TAILIEUCHUNG - Professional ASP.NET 1.0 Special Edition- P32

Professional Special Edition- P32:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | instead of the original component. When we execute the modified page we can see that the new value for average price is now displayed. We will also add some code to display the newest product Transactions in .NET To provide integration with COM the CLR provides the same declarative transaction model. This allows managed objects to participate in existing transactions. We can use these transactions from within pages and also from within .NET components. At the page level you can add a page-level directive for this @ Page Transaction Required The allowable values are Value Description Disabled Transactional context will be ignored. This is the default. NotSupported The page does not run within a transaction. The object context is created without a transaction. Supported The page runs within the scope of an existing transaction if one is active. If no transaction scope is active the page runs without a transaction. Required The page runs within the scope of a transaction either an existing one or creating one if no existing transaction exists. RequiresNew The page requires a new transaction and one will be created for each page request. To participate in the transaction success or failure you can either rely on transaction AutoComplete or explicitly commit or abort the transaction. With AutoComplete enabled your page will vote to commit the transaction if the page runs without throwing an exception. AutoComplete is enabled by default on a page so if the page completes successfully then the page will vote to commit. You can also explicitly control the transaction result by calling the methods of the ContextUtil class. To vote to abort a transaction you call And if you want to vote to commit a transaction you call For components we need to create a serviced component. Serviced Components A serviced component is one that is automatically serviced by the Windows Component Services .