Hi,
I would like to detect when a device is connected to an ethernet port of the machine that my application is running on. I know how to do this with a USB port but the problem is, the Port isn't USB!
If it was a USB device I would simply override WndProc and catch the message, if it is WM_DEVICECHANGE, then i'm on to a winner, I was ...
Somebody knows how to implement Oracle Advance Queue from C# using PL/SSQL and ODP.NET?
I can't find a single example or resource with concrete examples in C# or VB.NET.
Ideally I would like some examples on how the enqueue and dequeue messages with simple types (XMl/string).
...
I would like to set the Culture of a WPF application to a specific one based on user preferences.
I can do this for the current thread via Thread.CurrentThread.Current(UI)Culture, but is there any way to do this globally for the application (so it affects all threads by default)?
...
I've been hearing a bit about HORN lately, and wonder what problems it can solve or how a real life situation of using it is beneficial.
http://code.google.com/p/hornget/
...
I would like to reduce the following code. The below code works, however it is not very tidy etc.
<label for="Name">Name:</label><%= Html.TextBox("Name")%><%
if (!string.IsNullOrEmpty(Html.ValidationMessage("Name"))) {
string Error = HtmlRemoval.StripTags(Html.ValidationMessage("Name")); %>
<img src="Error.gif" alt...
I'm just wondering what kind of queues are lists and dictionaries in C#. Whether they're FIFOs or LIFOs.
...
My problem is in regards to calling a server-side event (e.g. DeleteClicked) from dynamically generated html/javascript on the client. I have an existing page on my website that is deeply rooted in .net. The page lifecycle is pretty complex and there are dozens of events that can be fired from the page.
We want to start taking advantage...
How I can pass my NetworkCredendials by .Net Remoting? Is it possible?
I've a service (TeamFoundationServer) where need a authorize using user's NetworkCredentials. In past, I had used open User/Password pair, but for security reason at now it is not good.
Problem is that NetworkCredentials is not serializable, and I can't pass it as p...
Possible Duplicate:
Which C#/.Net blogs do you read?
As a .NET developer I follow these blogs so far:
ASP.NET Weblogs
DotNetKicks
CodeBetter
Visual Studio Magazine Blogs
Scott Gu
Phil Haack
Brad Wilson
Which ones would you reccomend on top of these?
...
Similar to htmlunit, but for use with C#. I've seen that you can use htmlunit with .NET via IKVM, but I'd like a native solution if at all possible.
The aim is to add UI tests to our existing (xUnit.net) tests being run on the CI server. I'd like to be able to run UI tests in memory (since I don't want to be opening browser instances on...
In my database I have stored images in the "image" data type, showing up as a binary code.
I now want to retrieve all images from one column and diplay them on a asp.net page with C#.
databaseDataContext db = new databaseDataContext();
var images = from Picture p in db.Pictures
select p.pictureThumb;
then I use t...
I have a textbox that contain a string that must be binded only when the user press the button. In XAML:
<Button Command="{Binding Path=PingCommand}" Click="Button_Click">Go</Button>
<TextBox x:Name="txtUrl" Text="{Binding Path=Url,UpdateSourceTrigger=Explicit, Mode=OneWay}"></TextBox>
In the code-behind:
private ...
Hi
I am trying to copy whole directory tree from server's shared folder to my local machine, I found Best way to copy the entire contents of a directory in C# post and decide to use that but as I guess DirectoryInfo doesn't support network shares, how can I change this code to work with network shares as a source?
public static void Co...
Possible Duplicate:
Why Doesnt C# Allow Static Methods to Implement an Interface?
In my application I want to use a Repository that will do the raw data access (TestRepository, SqlRepository, FlatFileRepository etc).
Because such a repository would be used throughout the runtime of my application it seemed like a sensible thing ...
So I'm thinking of using a reference type as a key to a .NET Dictionary...
Example:
class MyObj
{
private int mID;
public MyObj(int id)
{
this.mID = id;
}
}
// whatever code here
static void Main(string[] args)
{
Dictionary<MyObj, string> dictionary = new Dictionary<MyObj, string>();
}
My question is, how...
How can I call a .Net Web Service from within php. Are there any useful libraries for php 4/5 ?
...
Given the following: byte[] sData; and a function declared as private byte[] construct_command()
if I were to then assign the result of construct_command() to sData
would sData just point to the contents of what's returned from the function or would some space be alloctaed for sData in memory and the contents of the result of the functi...
I'd like to allow some of our business analysts to write in linq instead of SQL where applicable. Corporate would never go for allowing linqpad to be installed, so where would I start on learning how to allow say simple linq queries or expressions in vs2008 project?
Is there sometype of eval() function for .net that would compile and ru...
I'm calling Membership.GetUser() from inside Application_Error() method in Global.asax file in an ASP.NET application in order to write down some log information.
However, it seems to fail if an error happens inside an HttpModule. Is it normal? Isn't Membership ready while executing HttpModules in ASP.NET? Am I doing something wrong?...
I have a few JPG Images. Some of them may have a black border on one or more sides, and I'd like to remove them. The black border may not go around the actual image - some may only have the border at the bottom (with the actual image at the top), while some could be centered (which means black borders on two sides, but not connected). Wo...