.net

Win32 vs .Net

Is .NET better than Win32 or the othe way around? Which would be the pros \ cons of both, in what situations one would be better than the other. Has Microsoft released .Net as a replacement for Win32? I am not asking about the amount of projects needed to be maintained, but about new projects being developed, and which would be better f...

Will serial calls to Threading.Timer.Change() reset the timer's clock?

If I call Threading.Timer.Change() twice in a row, when will the thread next run? For example: myTimer.Change(5000, Timeout.Infinite); // Only 2 seconds pass. myTimer.Change(5000, Timeout.Infinite); After this, will the thread next run in 3 seconds or 5 seconds? I hope the answer is the latter, that the timer is reset with each call...

Is there a way to use partial caching of a WebControl that includes CSS or JS file references?

The title pretty much says it. I've written a web control (a header) that is going into our common library, but it references a javascript file and a css file. It works fine the first time, but when I refresh the page it looses that reference because the control didn't get rendered again so it didn't put the references out there. Is ther...

Using a CheckBox to Select Rows in an ASP.NET GridView

With a GridView control in .NET is there any way to change the Select option in a GridView to a Checkbox, how do you select multiple rows? I tried adding a CheckBoxField into my GridView but when I ran it it didn't show up. ...

Hardware to begin .NET compact framework development

I am interested in starting some development with the .NET compact framework. What hardware devices would you recommend for all around testing? I would like to get two devices, one that has a lot of features and another that is representative of the average device. ...

Ninject and named item in session state

Hi there, is there a way to inject an object into the session state automatically with Ninject? For example: I have a provider that gets me a list of objects. In my views I have something that reads state from session like <%=Session["MyKey"].Data%> Now I want to be able to inject the value of Session["MyKey"] with Ninject instead of ...

ASP.NET MVC Custom Controller directory

Hello, I'm making an ASP.NET MVC website and I have a certain group of forms that are related (let's called them Foo). My first attempt to organized them was to have this structure: Controllers/FooController.cs ...and to have routes like this: Foo/{type}/{action}/{id} Unfortunately, since there are about 8 Foo sub-types, the FooC...

understanding String^ in C++ .Net

I remember seeing somewhere there "^" operator is used as a pointer operator in Managed C++ code. Hence "^" should be equivalent to "*" operator right?? Assuming my understanding is right, when I started understanding .Net and coded a few example programs, I came across some code like this: String ^username; //my understanding is you ...

C# - How to reflect the generic parameter that was used for inheritance

Let's say I have the following class hierarchy: TaskViewer inherits from ListViewer<Task> which in turn inherits from ViewerBase. If I debug into a method that is declared in ViewerBase and look at this.GetType(), it correctly returns TaskViewer. However, I cannot find a property or method which will return me the generic parameter tha...

How do I make cross-threaded calls to a ToolStripStatusLabel?

I tend to use a StatusStrip at the bottom of most of my applications for simple status updates and occasionally a progress bar. However, it appears ToolStripStatusLabels do not inherit from control, so they have no .Invoke, or .InvokeRequired. So how would I thread-safe make a call to change it's text property? Coded answers for poste...

dynamically configuring .NET client via socket

Hi, Anyone have a pointer to a C# configuration class that a .NET service can use to do configurations via an admin socket or other control port? I'd rather do this than a filewatcher on the app.config file. We have some long running C#/.NET services (24h X 6.5 days/week) that may need to be re-configured on the fly. I'm looking for a g...

What is the proper way to determine an application's location?

I'm writing a windows service in C# that spawns multiple instances of another application I am writing. There is a chance that the application can be installed anywhere on a machine. What is the best way to let the service know where the application is located? ...

Easiest way to develop/debug a Windows Service in .NET

I'm developing a Windows Service in VB.NET 2008, but I feel like I'm going to have an aneurysm. To debug the service, I've added a 15 second wait to the initialization code, which gives me time to start the service and attach the .NET debugger before anything happens, so I can hit breakpoints and such. I really miss "integrated" debuggin...

HowTo: Wrapping a DLL in a 32-bit process,a nd exposing a .net interface via remoting.

You wrote: I recently upgraded a c# windows service to run as a 64 bit .net process. Normally, this would be trivial, but the system makes use of a 32-bit DLL written in C++. It is not an option to convert this DLL to 64 bit, so I wrapped the DLL in a separate 32 bit .net process and exposed a .net interface via remoting. This is quite...

Different behavior between 'Service Reference' and 'Web Reference'

I have WCF endpoint exposed as defined bellow, <service name="MyApp.Server.Endpoint.Orange" behaviorConfiguration="MyTio.Server.Endpoint.OrangeBehavior"> <endpoint address="" binding="basicHttpBinding" contract="Host.Server.Contract.IMyAppApi" bindingNamespace="http://host.com/myapp"&gt; <identity> <dns value="localhost"/> ...

Referencing the same interface in different assemblies

Hi, I want to implement architecture involving different .NET assemblies (i.e. modules). Some of these modules should provide services which are used as .NET interfaces by other modules. The modules should be loaded and registered dynamically at runtime, I do not want to have "hardcoded" dependencies between them. Example: Module1.d...

Disable flash or other plugins in .NET WebBrowser control

Is it possible to disable Flash Player or any other plugins from being used by the .NET WebBrowser control? ...

How can I use FluentFile in Rhino ETL DSL?

I have been playing around with the Rhino ETL library and really like the direction that it's going. However I have found that the bad part about it is the documentation is sparse and there doesn't seem to be enough good information on how to create these pipeline processes and especially using the DSL. I am just attempting to create a ...

Using TypeDescriptor in place of TryParse

Hi Guys I am trying to replicate TryParse for generic types and thought that TypeDescriptor might give me what I am after. So I came up with the following test case but it is failing, just wondering if anyone knows where I am going wrong. [TestMethod] public void Test() { string value = "Test"; Guid resultV...

Google App Engine for Java, What is for .Net ?

Google App Engine is a cloud computing architecture that supports java based web services to be deployed. What cloud computing hosting options are available for .Net web developers ? ...