.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Advantage of Begin and End?

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net

I have the following code. The UI thread is blocked by code below when EndAdd gets called. Then what is the advantage of calling a method using Begin and End in example below? Is it that the UI thread does not consume extra resources for calling the new method ? So if the method was called synchronously then the UI thread or the main thread would consume whatever resources would be required by the Add method.

IAsyncRsult result = calculator.BeginAdd(x,y,null,null);

int sum = calculator.EndAdd(result);

View Complete Post

More Related Resource Links

WCF - Where do I begin


I was asked about a project that doesnt currently use WCF. Where do I even begin!

The object is to allow the application to make a secure call to a database.  I've not the foggiest where to begin.

Smartphones: Design Robust Apps that Take Advantage of Windows CE-powered Smartphone Devices


Smartphone applications promise to be at the crest of a new wave of cell phone advances as the familiar process of using Microsoft dev tools can produce cutting-edge mobile phone applications. Because Smartphones are Windows-powered devices, developers can easily and inexpensively extend both new and time-tested business applications to mobile users. These applications will possess the necessary levels of enterprise functionality while integrating mobile phone features through the use of several easy to use APIs. This article looks at the basics of building a real-world business application for the Smartphone.

Chris Dellinger

MSDN Magazine March 2003

XML Schemas: Take Advantage of Existing External XML Schemas with a Custom Import Framework in ASP.N


Over the years, many industry-standard XML schemas and dialects have been developed. These industry-specific schemas embrace the original purpose of XML and are extremely valuable in promoting and supporting B2B interaction. Unfortunately, the ASP.NET Web Services runtime does not allow developers to directly reference external schemas from within their XML Web Services interface (the WSDL file). This article builds an external schema framework as an extension to the ASP.NET Web Services runtime to enable you to reference external schemas within your XML Web Service interface.

Scott Short

MSDN Magazine December 2002

WMI and .NET: System.Management Lets You Take Advantage of WMI APIs within Managed Code


Visual Studio .NET and the Microsoft .NET Framework SDK provide a new set of APIs and tools that let you consume Windows Management Instrumentation (WMI) data and events from managed .NET applications. After presenting an overview of what's new for WMI in the .NET Framework and the Visual Studio .NET environment, the author provides an in-depth exploration of the Management Extensions in Visual Studio .NET for Server Explorer. These extensions help you develop management-aware software and come in handy in a variety of distributed application development scenarios.

Zina Pozen

MSDN Magazine May 2002

Windows XP Overview: Take Advantage of New Windows XP Features in Your Apps Today


Windows XP includes both improvements to the operating system and several new features that enhance the user experience. The most noticeable change in Windows XP is the user interface, which includes a revised Start menu and updated Task Bar. The new look is possible because Windows XP can be skinned, which lets the interface be changed dramatically with a new facility called themes. Windows XP also introduces fast user switching, which allows multiple users to be logged onto their own sessions at the same time on the same machine and, as the name implies, they can switch back and forth quickly. Another new feature, ClearType, is discussed here as well.

Douglas Boling

MSDN Magazine November 2001

C++ and STL: Take Advantage of STL Algorithms by Implementing a Custom Iterator


There are many benefits to using the Standard Template Library (STL) for C++ development, including the ability to use generic data structures and algorithms. To use the STL algorithms, an STL-conforming container is required. Iterating through the Internet Explorer cache is an informative exercise, but the cache is not an STL-conforming container. So, to use the STL algorithms to search and enumerate the Internet Explorer cache, an adapter is needed. Building such an adapter-an STL-conforming iterator-is the topic of this article. Also provided is an overview of the components of the STL and the Win32 Internet APIs used.

Samir Bajaj

MSDN Magazine April 2001

Upsize Your Database: Convert Your Microsoft Access Application to Take Advantage of SQL Server 7.0


What if you need to convert an existing Microsoft Access 97 database application into a true client-server application that is based on a SQL Server back end? If you know a little about Visual Basic and SQL Server, it's easy to make your app take advantage of the power and scalability provided by SQL Server 7.0. Using some concrete code examples, this article takes you step by step through converting the native Jet queries in your Access application into stored procedures and pass-through queries that SQL Server can use. You'll also learn how to pass on parameters when your client-server app calls these SQL Server stored procedures and queries.

Michael McManus

MSDN Magazine June 2000

text to XML - where to begin?

Hello, I am new to the ASP.net realm and have a long way to go so please bear with me! I have learned with coding (mainly Perl and XML/XSLT) that there are 100 different ways to do accomplish the same result.  I am hoping you can point me in the right direction. Senario: I am working on some automation helping out migrating configs from 1 hardware load balancer to another.  My goal is to be able to select and copy the appropriate portions of the config I want to migrate and then paste it into a textBox webform.  I need to take the input of the textbox and parse the data into XML.  Once its parsed to XML, then I need to have the new XML data assigned as a string variable so I can use it so send as a HtTTP request to the endpoint. Thats it!!  LOL Here is a sample of the data I need to parse to XML.  Note that the line order will not always be the same. I am only interested in the variables in bold vip address tcpport 80ip address 2100redirect "http://forums.asp.net" I hope I havent asked for too much on my 1st post :) Thanks!David            

what is difference between BEGIN TRANC and BEGIN TRANCSACTION?

hi guys what is difference between BEGIN TRANC and BEGIN TRANCSACTION? and which one is better? Best regards, Morteza.

The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a

Hi,   I am facing the below mentioned error:   The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].   I have a Insert statement which i am using to insert data into a remote server from my local server. I have added the remote server as a linked server in my local server but when i try to execute the statement i am getting the above mentioned error. I am using Windows Enterprise Edition 2003 and SQL Server 2000.   I have also enabled the Allow InBound and Allow OutBound in the security configuration of My Computer properties but still i am facing the same problem. Kindly let me know how to resolve this issue.   Thanks.

Advantage of Configuring HTTP Access to SQL Server 2008


I am Configuring HTTP Access to SQL Server 2008. I successfully did this.

Now my question is, What is the advantage of XMLA provider over MSOLAP analysis service provider??


Let us TRY this |

My Blog :: http://quest4gen.blogspot.com/

How to begin storyboard based on ListBoxItem selection???

0 down vote favorite

I encounter a problem that I cannot solve. I hope to find an answer here. I need a listbox to hide half way when a certain listboxitem is selected. I setup a storyboard with opacity mask animation which work fine in blend. My problem I cannot initiate BeginStoryboard. I tried numerous ways and no success. I need to hide the listbox to reveal the content behind it. I generate listboxitems from XML data file and based on the name node I planned to initiate storyboard playing.

Here what I have. I created DataTemplate which I set via Setter in ListBoxItem Style:

<DataTemplate x:Key="SelectedListBoxItemDataTemplate">
			<StackPanel x:Name

What is the Advantage of using MVC and/or Entity Framework



I am new to Entity frameworks-EF. As, EF is built on top of ADO.NET...If so, will there be any performance issue when we use it?

Same way MVC also targets Test Driven , rapid application development only ..What speciality does it add for end-users?

As per my understanding ASP.Net 2.0 itself is powerful without MVC and/or EF...

Can anyone , please explain why and when should we prefer using EF with asp.net application?

Thanks in advance..

Compare to Index with Included Columns, what's the advantage of composite index


I found lots of blog talk about the advantage of [include] index, for example, to avoid the Size Limits. But what's the advantage of composite index?

I created two tables with the same structure and data. table(a,b,c), and then created two indexes for each table index C_index on table1 (b,c)  and index I_index on table2 (b) include (C). But I got the same execution plan all the time even if the indexes are different. For example:

select B, C from table

select c from table where b =**

select b from table where c=**

select a from table where b=** and c=**

select a from table where c=** and b=**

... ...

i konw that the key columns are stored at all levels of the index, nonkey columns are stored only at the leaf level. But I cannot find an example to show the disadvantage compare to composite index. I must be missing something, but what's that?




BEGIN, END, and GO Question



Sorry for the basic question here but when is it best to create new BEGIN, END, and GO blocks for SQL Statements?  In my case, I have a stored procedure that I created, below is a snippet:

I have something like this:





INSERT INTO etc, etc




The above snippet has just one insert statement, but if I had multiple insert statements that weren't necessarily related should I create a new BEGIN END block for the each of the other insert statements?
  1. Does BEGIN END cause the statements to be executed in a transaction block so if one statements failed, it would rollback or is that done differently?
  2. When is GO needed?








WCF/MSMQ Issue - Not sure where to begin


I've created a prototype application which uses WCF and MSMQ to send simple "hello world" messages from a client app to a server app.  I was able to get it successfully working on my machine. 

However, being a client/server technology, I need to get this prototype working across a network.

So, I got a second PC, installed MSMQ on it and my client application.  When I run the client app on this second PC, it does not work correctly.  I don't get any run-time exceptions, however, the messages are not received on my server.  If I go into my client PC's Computer Management console, I can see the messages in its outgoing queue.  So, it appears that the problem is that my client app is not connecting to my server app.

Both machines are on the same domain and can see each other in Windows Explorer.  I'm able to copy files back and forth from both PCs.  If I execute MessageQueue.GetPrivateQueuesByMachine() on my client PC, I can see my server's queues.  I should note that my server's queue is private. 

I'm using Visual Studio 2008, .NET 3.5.  My server machine is running Windows 7.  My client PC is running Windows Server 2003 R2.  My binding is netMsmqBinding.

To create my prototype, I am using Michele Bustamante's QueuedServices example from chapter 6 of her &q

Sybase advantage.net data provider





I'am trying to add an advantage data connection to visual studio. I donwloaded the advantage data provider for that. Somehow i cant speciafy the server port address in the provider. I've tried to add servername:port and servername,port but it throws error 6420.


Anybody having experience with this?


Thanks René 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend