.net

Working on embedded worksheet (MS Excel)

Hi, I have one excel workbook and, in one of the worksheets there is one cell where there is one embedded workbook. I want to read/write cells on that worksheet using interop. Please help me on how will I read/write on that workbook. The formula for that cell is =EMBED("Worksheet","") ...

HtmlDocument.InvokeScript Issue in .NET WebBrowser Control

I'm trying to make a wrapper around last.fm and need to invoke some of the javascript functions in the page. Particularly the ones for Stop, Skip, Ban and Love. InvokeScript seems to work fine with any script function that is within the page HTML itself, but not with scripts loaded from external script files. For example, the actual c...

EF. Delete entity by Id that has foreign key

I have two tables Job (Id, Title) and Employee (Id, Name, JobId). 1-* relationship. How can I delete Employee that has reference to it's job without retrieving information from the database? I can do something like that: var j = new Job { Id = 1 }; // UGLY, I have to create and attach Job instance and job.Id should be exactly the sa...

About MVC 2 View mapping mechanism

Hello everyone I wonder mapping mechanism from controllers to views. I can not understand how mapping can be possible If we just return value of View() method. Controller class's View() method call overloaded View method with null parameters. But how can be possible to mapping to views with none specified returning value of View() metho...

What digital camera models support programmatic control? (I want to use .net)

Has anyone seen a list of digital cameras that support live programmatic control? Taking pictures and live video streams. Probably via USB connection. I will probably use silverlight. ...

Find Where .Net Assembly Is Being Pulled From

I have fou.dll that also needs friendfou.dll When I compile my project friendfoul.dll is being pulled into my bin folder from somewhere, I can tell because I delete friendfoul.dll and it reappears on compile. How can I tell where friendfoul.dll is being pulled from? ...

What Garmin protocol GPS library for .NET exists

Hello, I'm developing a GIS application and i had been using devices that output NMEA protocol. There are lot's of libraries for NMEA devices, but for garmin there is only one that i have found and isnt very complete: OpenGPS.NET I have 2 questions: 1) how do i use the library whit an USB device that does not create a virtual com...

Career advice: moving from PHP to .NET

I am trying to ditch PHP and focus on .NET/C#. I think with PHP you are limited to web stuff only and jobs seem to pay lower compared to other programming languages. What is your opinion? Is there any other technology that seems to be in demand? My main issues with PHP are: The language normally never changes / it is simple to learn...

using wix to register .Net assembly marked for COM interop

I've got a vanilla .net class library which contains some types which are [ComVisible] and the assembly itself is marked "Register for COM Interop". I'm trying to build a WIX installer for the app which will need to not only copy the .net assembly to the INSTALLATIONDIR on the target machine, but also do the work of registering that the ...

iso-8859-1 to utf-8 in c#

hi, Is there a way to transform a xml file which is iso-8859-1 to utf-8 ? ...

Using mciSendCommand to capture video frame

Using VB.Net is it possible to capture a frame from a video and save it to an image file by using mciSendCommand? (as that is what is being used to play the video) Thanks. ...

TraceSwitch and SourceSwitch - what's the difference?

So I'm probably missing the obvious here, but what actually is the difference between the functionality of the TraceSwitch and SourceSwitch classes? They both give identical summary descriptions: Provides a multilevel switch to control tracing and debug output without recompiling your code. Are the Remarks sections are oddly simil...

Why IndexOf returns always Zero?

Could someone point me why the IndexOf returns always zero in the following text? Dim Str as string = "<p><img class=floatLeft width="330"src="http://www.com"&gt;&lt;/p&gt;&lt;p&gt;" Dim Idx as integer = Str.IndexOf("<p>") Is there any other way, of getting the index? ...

C++ native Vs C++/Cli Performance ( for OpenCV project)

We're developing a project that uses OpenCV library to track hand gestures and motion sensing. I'm confused whether to go for native c++ program or to use C++/CLI provided in .NET (VC++). Performance is of utmost importance and heavy image processing is required. since we're planning to use the OpenCV extensive methods and the project r...

Should we always include a default constructor in the class?

I have been asked this question by a colleague that should we always include a default constructor in a class? If so, why? If no, why not? Example public class Foo { Foo() { } Foo(int x, int y) { ... } } I am also interested to get some lights on this from experts. ...

id() in XPATH with .NET

I'm trying to query XML through XPATH but is having problem getting id() to work. I would like to get all the authors for a book, specifying the book ID. Here's the XML. <?xml version="1.0" encoding="utf-8" ?> <bookstore xmlns="http://litemedia.se/BookStore.xsd"&gt; <book id="ISBN9789170375033"> <title>I väntan på talibanerna</ti...

Oracle ODP.NET version agnostic alternative

I am implementing an x64 application, connecting to Oracle. What driver should I use, to make sure that it doesn't matter what client version the user has installed. So, right now I'm building my versions with an x64 and x86 ODP.NET driver, but I'm worried that this won't work when the user has an older/newer version of the Oracle clie...

Problem with the DataTable and DataGridView objects

Hello everyone, I have the following problem In my aplication I doing some calculations and after it put them into DataTable object (6 columns, data in the latest one is most important). To view the results I put them into DataGridView object and there is my problem. Depending on the data contained in the last column I want to mark the...

storing Interop AxInterop dlls in source control

Hi all, I have recently inherited a C# .NET solution in VS 2008, .NET framework 3.5, with many 3rd party dependencies including several on COM dlls. I checked out the latest from the source control system and found I had to generate the Interop, AxInterop dlls in Visual Studio (adding references and adding them to the Toolbox and draggi...

Converting interface implementation from VB.NET to C#

This may seem like an obvious answer, but I can't seem to find an answer. I have this code in VB.NET: Public Interface ITestInterface WriteOnly Property Encryption() As Boolean End Interface And I also have this class and implementation in VB.NET: Partial Public Class TestClass Implements ITestInterface Public WriteOnly...