.net

.NET Video Training Tutorials - When considering cost vs. quality, how do LearnVisualStudio.net and Pluralsight compare?

I'm considering LearnVisualStudio.net or Pluralsight for .NET video training tutorials. LearnVisualStudio.NET is much less expensive and from a superficial look, the quality of the training looks so-so. PluralSight is much more expensive and from a superficial look, the quality of the training looks very good. Has anyone compared th...

Tutorial for Unit Testing with VS 2010

Hi I am new in unit testing and need some book or tutorial. I have looked alot in google, but can't find anything. I saw this question, but there is no answer, that's why I am asking it too. Is there anything from which I can start? Thanks. ...

WMI Performance counter Query issues

Hello Is there a way to query via WMI in C# like you can do with the System.Diagnostics.PerformanceCounter Class? simply put how can i pass it a string like "\localhost\Processor(0)\% Processor Time" and it would build the correct WMI query for me? Reason being is i have this huge list of counters in a flat file from a legacy program and...

SideBySide problem with debug build on a VM.

I have a .NET application that is developed with Visual Studio 2008 which uses a C++/CLI DLL named xVJob.dll. I am getting SideBySide errors when I try to run it on a test VM. The VM is running Windows Server 2003 SP2. I can run and debug everything fine on my development machine, but when I try to run it on the test VM, it throws an ...

Server Error in '/MobileAdmin' Application.

I have recently hooked up an Android device to Exchange 2003 via ActiceSync, and the MobileAdmin application (https://server/mobileadmin) crashes when I lookup a mailbox that is associated with an ActiveSync device. When I look up a mailbox that is not associated with a mailbox, it simply replies "No devices were found for this mailbox."...

LINQ to SQL join 3 tables and select multiple columns and also using Sum

Hi, I have three tables Student, TimeSheet and TimeRecord. Talbe columns: Student : StudentId, FirstName, LastName TimeSheet: TimeSheetId,StudentId, IsActive TimeRecord: TimeRecordId,TimeSheetId, BonusHour(type int), CreationDate Table relationship: Student 1:N TimeSheet (FK StudentId) TimeSheet 1:N TimeRecord (FK TimeSheetId) ...

How to hide infrequently used menu items in .net windows forms application?

Most folks will know the behavior of ms office applications menus: When opening a menu, the user at first only sees the menu items which are used frequently. Hovering over the menu with the cursor or clicking on a small "arrows" symbol expands the menu to show all items. Still the formerly hidden items have a lighter background color. Wh...

.NET / C# String Reference in Code Behind Not Loading Updated Value

I seem to have run into a strange issue whereby a string reference is not loading an updated value. In short, I've replaced a DLL file (App_Code.dll) that contains a bunch of page titles (think HTML Page Titles), but the values aren't being updated when referenced from other DLL's. Here's a code snippet from a codebehind of a sample pa...

How to retrieve the selected image in Webcontrol/IE with .Net(C#)

Nice! Now I can get the selected text with my IE plugin. Now I have another problem. How to grab the selected Image on the webcontrol/IE???? Thanks I really appreciate the help. ...

WPF: Globaly defined ValueConverter

Is there a possibility to declare a IValueConverter for an application global, so that if a conversion in a Binding is needed, automatically the appropriate converter is used. E.g. I have written a IValueConverter that converts between int and MySpecialClass. I have a Binding that has a source that returns an instance of MySpecialClas...

Configuring "no-proxy" in Fluent Nhibernate

Hi everybody. Just a short question: How do I configure the many-to-one attribute "lazy" to the value "no-proxy" (as mentioned here here ) in Fluent Nhibernate? ...

why am I getting "error CS0016 : process cannot access ...", when I recompile the dynamically compiled and unloaded dll.

hello, in my application, i use CSharpCodeProvider class to dynamically create a dll file and load the file into another appdomain to use the class in it. when i am done with the class, i simply unload the appdomain. everything is perfect so far. but if i try to recompile the dll at runtime, i get the following error. E:\projects\Com...

Finding out windows installer information

How can i using c# find out information on the windows installer(msi) program was installed on ? to try to explain this better, i want to be able to look at a program say WINWORD.EXE and find information on the windows installer it was installed with. i know windows keep a log of this in the registery Thank you ...

.net Assembly security question

I am creating an app with several DLLs and thought I could just call Assembly.GetPublicKey() at run time and see if the DLLs were signed by me. However, I now see there's a SetPublicKey method on the Assembly. Doesn't it make it easy for anyone to spoof my DLLs? Or am I checking the signature of the DLLs the wrong way? Update: I have a ...

Adding a custom button to Windows Explorer toolbar in Windows 7

Hi, I am trying to add programmatically a custom button to windows explorer toolbar in windows 7. I know how to add it manually but I need to do it in an installation process. Manually adding it involves changing windows registry. Also if someone knows how to take ownership of a key in windows registry (even beeing an administrator) and...

TryCast fails where DirectCast works (.NET 4.0)

Hi, I find this behavior of TryCast in .NET 4.0 / VS 2010 rather confusing. In my understanding TryCast works like DirectCast, but will return Nothing instead of throwing an exception if a conversion is not possible. VS 2010 / .NET 4 ?TryCast(CType(1, Object), String) Nothing ?DirectCast(CType(1, Object), String) "1" VS 2008 / .NET...

Quick way to create a Master Detail Database viewer

I have a customer that wants to see some data. I can just sent it to him in an excel file, but the data is master/detail data and it would be nice to send it to him in a tree like form. Is there an really easy way to put data into some sort of free master detail viewer like that? Or to code one one Quick in C# and visual studio 2008 o...

Code analysis fails on project referencing obfuscated assembly

Visual Studio 2010 code analysis fails to run now that we've incorporated a 3rd-party assembly into our project. Project : error : CA0055 : Could not load C:\Programming\MyAssembly.dll. Project : error : CA0052 : No targets were selected. Project : error : CA0058 : The referenced assembly 'TheirAssembly, Version=1...

Retrieving 2 SQL querry from one page to other using hyperlink GridView

Greetings everyone, I have a code to pass the querry from a one page that has a gridview hyperlink but what i didn't know is how to retrieve it.. Here is my code i hope you could help me fix this one.. thnx Have a nice day ^^, Default1.aspx(Gridview1) page: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="Fa...

Two UpdatePanelAnimation Extenders - causing animation to fire on both update panels.

Me again! I have the following that changes the label colour according to an update panel: <asp:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" Enabled="True" TargetControlID="UpdatePanel1"> <Animations> <OnUpdating> <Color AnimationTarget="lblSearchResults1...