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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Deadlock - i guess i have an idea why, but i'd like to make sure.

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :Windows Application


What happens if form A is waiting on a lock(object) while another thread, which has the lock for this object, performs an A.Invoke(...)?

I have a deadlock and not finding any other explanation i assume this may cause it.

View Complete Post

More Related Resource Links

Beginner: this doesn't make sense to me


Do you need and "empty" script tag in the head to run scripts that are in the body?  Also, can you run JQuery scripts if they're in the <head> tag?  The first sample only works if the JQuery script is in the form (and body) tag, not in the head - even if I add $(document).ready(function() { });

This works

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">
<form id="form1" runat="server">
<a href="">Here is a link</a>
<script type="text/javascript">
$('a').click(function () {
alert("you clicked me!");


This doesn't work.  Notice I removed the second <script> tag from the head

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="serve

how to make a dropdownlist looks like google search box


dear all...

any idea how to do that ?

Thnx in advance

Need Syntax To Make Results of LINQ Union Return Non-Generic Type



I have the below SQL which works just fine:

SELECT     Message, CreateDate, AccountId, AlertTypeId
FROM       dbo.Alerts
SELECT     TOP (100) PERCENT Status, CreateDate, AccountId,
                          (SELECT     10 AS Expr1) AS AlertTypeId
FROM         dbo.StatusUpdates
WHERE AccountId = PassedInParameter

I have been going about trying to convert the above into a LINQ method and am having problems with return types.
As the above SQL illustrates, I am querying two distinct LINQ tables - Alerts and StatusUpdates -
and then attempting to perform a Union on them. In order to do the union in LINQ, I have to have agreeing types. So, I
am using "var" to make the results of "alerts" and "updates" generic before the union.  

public IList GetStatusUpdatesAsAlertsByAccountId<T>(Int32 accountId)
            using (WorkbookDataContext dc = _conn.GetCont

Unable to make connection to database?


Hy guys. I try to connect my database for so long so i wrote two type of codes. Let's discuse first on.

I have database called PhoneDirectory.

It have only one table named Residents.

I have button wiht ID="Button1".

I want when i click this button to see all of my residents. 

I want to see the result in DetailsView and to be able to edin, delete and add new resident.

First try with SqlDataSource so i wrote this:

<asp:SqlDataSource ID="Resident Details" runat="server" ProviderName="System.Data.SqlClient" ConnectionStrings="<%$ ConnectionStrings:ThisIsTheConnection%>" 
              SelectCommand = "SELECT * FROM Resident "

how to make a css style background image be linked to an image in the resource file


hey guy, i need help in a very troubling matter. I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.

thanks in advance

Make sure that the class defined in this code file matches the 'inherits' attribute, and that it e


Here is the page directive for the page that throws the error:

@ Page language="c#" Inherits="University.AspNet.Index" CodeFile="Index.aspx.cs" %>

The code behind file Index.aspx.cs starts like this:

using University.Framework.UI;

namespace University.AspNet

public partial class Index : University.Framework.UI.HomePage

The code behind is extending this HomePage class, which is in turn an extenstion of another class University.Framework.UI.Page, which extends the System.Web.UI.Page class.

Am I misusing the I

.NET Matters: Deadlock monitor


This month Stephen Toub discusses deadlocks that can occur when synchronizing threads.

Stephen Toub

MSDN Magazine October 2007

Mobility: Make Your WPF Apps Power-Aware


Here Andre Michaud shows you how to use power notifications to make your applications power aware.

Andre Michaud

MSDN Magazine July 2007

SQL Server 2005: Regular Expressions Make Pattern Matching And Data Extraction Easier


Now you can perform efficient, sophisticated text analysis using regular expressions in SQL Server 2005.

David Banister

MSDN Magazine February 2007

Graphics To Go: Make A Mobile Imaging App With The .NET Compact Framework 2.0


This article focuses on developing for Pocket PCs, a skill which can then be transferred to Smartphone application development.

Rob Pierry

MSDN Magazine December 2006

Say What?: Make Sense of Your Web Feedback using SQL Server 2005


By now, you're certainly collecting a variety of data from your Web site. But once you collect it, what do you do with it. For it to be meaningful, this data must be categorized and analyzed. The SQL Server 2005 data mining functionalities can help you get the most out of those reams of data you collect, as Peter Pyungchul Kim explains.

Peter Pyungchul Kim

MSDN Magazine June 2005

Make It Snappy: Juice Up Your App with the Power of Hyper-Threading


In this article, the author explores the hyper-threading technology found on newer Intel Pentium 4 processors and demonstrates how adding parallelism to your code can improve performance on hyper-threaded machines. He covers advanced optimizations for hyper-threading and shows a number of useful patterns. Code samples are in C#, but you can apply the same principles in other languages as they apply to both managed and unmanaged applications.

Yaniv Pessach

MSDN Magazine June 2005

Go Global: Make the .NET World a Friendlier Place with the Many Faces of the CultureInfo Class


CultureInfo is a complex .NET class whose objects are used for resource loading, formatting, parsing, casing, sorting, and other conventions that change as the language, location, or writing system is changed. It can be tricky to use correctly in every situation. Here Michael Kaplan explains some common scenarios in which you will use CultureInfo and provides information about the behavior, best practices, and consequences of a wrong decision.

Michael Kaplan

MSDN Magazine March 2005

.NET Code Tuning: Make Your Apps Fly with the New Enterprise Performance Tool


Because the common language runtime (CLR) is a black box, it's pretty hard to divine what's going on when you want to track down performance problems. Microsoft will be delivering a brand new profiler, the Enterprise Performance Tool (EPT), as part of Visual Studio 2005 Team Developer Edition that's ideal for use on a production system because it offers some very lightweight means of collecting performance data. Here John Robbins takes you on a tour.

John Robbins

MSDN Magazine December 2004

Debugging: DataTips, Visualizers and Viewers Make Debugging .NET Code a Breeze


There is a whole host of new goodies in upcoming release of Visual Studio 2005 that will enhance your debugging experience. One such improvement will make it easy to visualize types within the debugger. This article discusses those improvements and covers debugger attributes and type visualizers. In addition, the author shows you how to extend the display of your own types with custom attributes and how to plug in an assembly to visualize.NET types built into the framework.

Morgan Skinner

MSDN Magazine May 2004

WS-Security: New Technologies Help You Make Your Web Services More Secure


Without good security, Web Services will never reach their potential. WS-Security and its associated technologies, the focus of this article, represent the future of security for Web Services. Provided here is an overview of these emerging security standards that explains what they do, how they work, and how they get along together. Topics discussed include integrity and confidentiality and how these are provided by public key cryptography, WS-Security, and more. Some of the key components of WS-Security, such as the wsu namespace, are also covered.

David Chappell

MSDN Magazine April 2003

.NET Exceptions: Make the Transition from Traditional Visual Basic Error Handling to the Object-Orie


If you're used to Visual Basic 6.0 and you're making the transition to Microsoft .NET, you will find that error handling is quite different from what you've used for years. Visual Basic .NET uses a more object-oriented solution to signaling and responding to unexpected problems while your program is running. This approach, called structured exception handling, has a number of advantages over the On Error statements provided in previous versions of Visual Basic. For instance, exceptions give you lots more information about exactly what went wrong in your app. To help you take advantage of this modern error handling paradigm, this article will show you how to raise and respond to exceptions, as well as how to create your own custom exception classes.

Jesse Liberty

MSDN Magazine November 2002

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