Any ideas how to fix this?
UserService.UserServiceClient userServiceClient = new UserServiceClient();
userServiceClient.GetUsersCompleted += new EventHandler<GetUsersCompletedEventArgs>(userServiceClient_GetUsersCompleted);
userServiceClient.GetUsersAsync(searchString);
.
<system.serviceModel>
<bindings >
<b...
I'm looking more towards CMS's as I'd like my clients to be able to be as self sufficient as possible. Anyhow, I'm just starting to evaluate and will update this with my conclusions. However, since I'm starting with evaluating Umbraco first, I'd like to get a consensus.
I have no preference for C# or Vb.Net. so I'm open to either.
...
If anyone's used Access recently, you might recall that when it displays data for a table that has a relationship, a little expandable node appears next to each row. Clicking on it shows all of the data from other tables related to that row in-line, underneath the row.
I basically want to do that in .Net. Is this something I can do usin...
I was wondering how people handle a ListBox control that has no items? e.g. I want to bind a list of search results but if no results are found i would like to display "No results found".
The way i currently tackle this is that i hide the listbox if the result set count = 0 and show a label with the "No results found" message. Ideally ...
I have a Windows Forms application that runs locally on the user's desktop. The only way it accesses the Internet is by doing System.Diagnostics.Process.Start(url) to launch the user's default browser and point it to various URLs (to check for updates, contact us, etc.). And none of this happens without the user explicitly requesting it ...
I have a byte array which I got back from a FileStream.Read and I would like to turn that into a string. I'm not 100% sure of the encoding - it's just a file i saved to disk - how do I do the conversion? Is there a .NET class that reads the byte order mark and can figure out the encoding for me?
...
I'm developing an application written in C# which hosts IronPython. What I'm planning is that the users will write python scripts, which contain classes implementing a pre-defined interface.
Something like:
Define interface in C# code:
public interface IPlugin
{
void DoSomething();
}
Implement the interface in python code.
class ...
I would like to play sound in my application, as far as I know, .net can only handle wav files by default. Is there any sound playing library which I can use? I know about bass but it is not free for commercial use. Any pointers would be helpful.
...
We are looking at implementing a card-reader program for a integrated computer. The computer is a touch-screen with an embedded computer, running Windows XP, and a cardreader integrated into the screen.
The reader is a USB device, but unfortunately integrated so tightly into this screen/computer that I cannot detach it and connect it to...
Hi,
Is this query equivalent to a LEFT OUTER join?
//assuming that I have a parameter named 'invoiceId' of type int
from c in SupportCases
let invoice = c.Invoices.FirstOrDefault(i=> i.Id == invoiceId)
where (invoiceId == 0 || invoice != null)
select new
{
Id = c.Id
, InvoiceId = invoice == null ? 0 : invoice.Id
}
...
The advantage of using generics is that it increases the type safety - you can only put in the correct type of thing, and you get out the correct type without requiring a cast. The only reason I can think of for not using generic collections is that you need to store some arbitrary data. Am I missing something? What other reasons are the...
It's often the case when I need to check a method's arguments for not being null, something like:
public static bool operator <=
(ApplicationVersion i_app1, ApplicationVersion i_app2)
{
if (i_app1 == null) throw new ArgumentNullException("i_app1");
if (i_app2 == null) throw new ArgumentNullException("i_app2");
[...]
}
...
I've got a UserControl that contains a menu. I need to bind the Menu.Icon to a property of the UserControl but it's not working.
The code starts like this -
<Border Grid.Row="0">
<DockPanel>
<Image x:Name="testImage" Height="16" Width="16" Source="{Binding ElementName=UC,Path=AddImage}"/>
...
How can I make my C# application the default "Print Screen" handler in Windows?
I wrote a screen capturing utility and I want to, ideally, have it replace the default print-screen handler, or otherwise have a unique key combination that would trigger it.
I know how to do it in C++ using global hooks, etc., but it's not clear to me how ...
I'm using C# to create a non standard shape WPF window, and because of some problems with "AllowTransparency=True", I used CreateRoundRectRgn, CreateEllipticRgn and SetWindowRgn win32 API Region functions, but there's a problem cause the edges are not smooth as you can see in the picture here http://img17.imageshack.us/img17/206/sampley....
Consider the console application below, featuring a method with a generic catch handler that catches exceptions of type TException.
When this console application is built with the 'Debug' configuration and executed under the Visual Studio debugger (i.e. through the *.vshost.exe) this fails, in both Visual Studio 2005 and Visual Studio 2...
I have a Generic Type Interface and want a constructor of an object to take in the Generic Interface.
Like:
public Constructor(int blah, IGenericType<T> instance)
{}
I want the code that creates this object to specify the IGenericType (use Inversion of Control). I have not seen a way for this to happen. Any suggestions to accomplish...
Hi all,
I'm working on a commercial project, a small part of this project will be creating reports and writing the report to a PDF. How would you recommend I do this? I'm only aware of open source projects such as itextsharp.sourceforge.net but I'm guessing I can't use this commercially. What are my options? Anyone done this?
PS Using ...
I have a Page (form) that has many UserControls on it, and I'm trying to have a single button to save everything. The UserControls are actually nested, so I wanted to somehow signal to each UC that it should save itself, instead of somehow wrapping everything into one event or having a single event trigger a cascade of save events.
My ...
In the SignOut method of System.Web.Security.FormsAuthentication, the ASP.NET team chose to expire the FormsAuth cookie by setting the expiration date to "Oct 12 1999".
HttpCookie cookie = new HttpCookie(FormsCookieName, str);
cookie.HttpOnly = true;
cookie.Path = _FormsCookiePath;
cookie.Expires = new DateTime(0x7cf, 10, 12);
What's ...