.net

Starting and displaying progress of multiple synchronous operations

I have a WinForms app and am trying to add the ability to start up multiple operations based on data entered in a datagridview. The operations must be run synchronously to monitor that they complete succesfully before inserting a row into the DB to indicate that the operation was succesfull. I also have a status event handler on the ope...

SQLServerCE Problem with parameterized queries from .NET

Hello, I am pulling the hair out of my head trying to figure this one out. I can't make Parameterized queries to work in VB.Net, when I am using parameters. From what I have found, using a parameter in a function, from .NET raises an error (see sample code). However, running the not working query in the Query Window in Visual studio w...

How to include SqlExpresss 2008 (conveniently)

When I make a setup project in VS 2008, and select <Setup Project>, Properties, PreRequisites then i can select SqlExpress2005 to be automatically included. What I am looking for is a walkthrough of how to get SqlExpress2008 included in the same manner. Second choice would be how to get (or make) a MergeModule (MSM) file to do the sa...

Using .NET 4.0 for development server

My ASP.NET application runs on IIS on my web server and uses Microsoft .NET Framework 4 Beta 2. (Its Application Pool is set to .NET Framework version .NET Framework v4.0.21006.) I debug on my development machine using the ASP.NET Development Server that comes with Visual Studio. How do I make my development machine also use .NET 4.0 ...

What will passing a Dictionary into Controller.Json return?

Let's say I have a Dictionary<string,object> like so: var foo = new Dictionary<string, object>(); foo["bar"] = new { Quux = "bacon", Quinge = 42 }; foo["baz"] = DateTime.Now; I expect it the result to the user would be akin to: {"bar":{"Quux":"bacon","Quinge":42},"baz":"2009-12-02 17:23:00"} However, it could just as easily...

Converting a .NET object to (byte*)

Is there a way to cast a System.Object to byte*? ...

Unity Configuration and Same Assembly

I'm currently getting an error trying to resolve my IDataAccess class. The value of the property 'type' cannot be parsed. The error is: Could not load file or assembly 'TestProject' or one of its dependencies. The system cannot find the file specified. (C:\Source\TestIoC\src\TestIoC\TestProject\bin\Debug\TestProject.vshost.exe.config li...

Can I develop for .NET Framework 4 in Visual Studio 2008?

My ASP.NET application runs in IIS on my web server and uses Microsoft .NET Framework 4 Beta 2. (Its Application Pool is set to .NET Framework version .NET Framework v4.0.21006.) It gives this new error: A potentially dangerous Request.Form value was detected from the client... This is due to a breaking change in .NET 4. To rev...

.NET document management system design - performance questions

I need to develop a basic .NET document management system with the following specifications: The data should be portable and self contained, so I will serialize the documents (typical formats include Word, PDF, Excel and Powerpoint) into binary data. I will then store said binary data in a SQL Server 2005 database. When a user needs to...

How to get properties from FieldInfo in C#?

Hello, I have this method and want to get all properties from the FieldInfos? How to get it? private static void FindFields(ICollection<FieldInfo> fields, Type t) { var flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly; foreach (var field in t.G...

Most elegant way to get the array element by position?

I have an array: private int[,] _blocks = new int[6, 4]; It represents a set of blocks which is 6 deep horizontally and 4 deep vertically. Graphically it looks like this: I need a function that would take in a number, from 1 to 24 and return the array element that matches. So for number 14, I'd get back _blocks[1, 2]; I've creat...

How to add to end of array C#?

How do I add a new item from a TextBox and Button on a Windows Form at the end of an ArrayList which references a class? private product[] value = new product[4]; value[1] = new product("One",5) value[2] = new product("Two",3) value[3] = new product("Three",8) Workflow Enter new products details into textbox1, textbox2, textbox3 W...

Lucene.NET in medium trust

Does know how to make Lucene .NET 2.3.2 run in a medium trust environment? GoDaddy doesn't like it the way it is. ...

GridBagLayout .NET WinForms

Is there anything similar to Java Swing's GridBagLayout on .NET and Winforms? ...

Creating single EXE file for project using .Net and another external library

I have an email client created for class that we need to run as a single EXE. It is made with C++ .NET, and the external POCO library, which has a ton of DLL files... What would be the best way to make this happen? I was looking on some similarly asked questions, and some people recommended tools such as ILMerge and Ezirez, but the que...

DROP DOWN LIST ID

can two drop down lists in two different web content forms be assigned the same ID? ...

Is it possible to get the index (start position) for the selected text in a WebBrowser control?

I would like to get the index (start position) for the selected text in a WebBrowser control. Similar to the index you would get when doing a regular expression search. I want to get the "line and column number" of the selected text. These can be determined based on the index of the selection. I have tried using an IHTMLTxtRange in com...

Recommend Linux + Java books, resources for .NET developer

Hi, I want to learn Java and Linux. Java itself (as a language) is not a big deal for me as I know pretty well .NET and C# (so the paradigm is similar). The biggest issue for me would probably be doing Java on Linux platform (I have never used Linux before). I think Ubuntu should be good for me (a friend of mine recommended it). ...

C# .NET form.Show() is very slow

Hello everybody, I got a problem with form.Show() in C# .NET Framework 2.0. //segment code (FormA's caller) FormA frmA = new FormA(); writeLog("Begin: " + Environment.TickCount); frmA.SuspendLayout(); frmA.Show(); frmA.ResumeLayout(); writeLog("End: " + Environment.TickCount); .... //segment c...

. NET Creating Excel Files

Hi, In my application, I need to generate excel files on the fly. I have an option of using Excel library. But it is mandatory to have excel installed on the machine. Is there any other .NET API to generate excel files at runtime which doesn't require excel. Thanks, Mahesh ...