Is there a way to have the custom validator take the input from two controls, say for example two check boxes and make sure that only one is checked?
Or am I going about this all wrong, and more importantly if I am could you point me in the right direction?
Even if this is the wrong direction actually I would like to know how to do thi...
Hi
When using NAudio to playback an mp3 [in the console], I cant figure out how to stop the playback. When I call waveout.Stop() the code just stops running and waveout.Dispose() never gets called.
Is it something to do with the function callback? I dont know how to fix that if it is.
static string MP3 = @"song.mp3";
s...
I run an external program from ASP.NET:
var process = new Process();
var startInfo = process.StartInfo;
startInfo.FileName = filePath;
startInfo.Arguments = arguments;
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
//startInfo.RedirectStandardError = true;
process.Start();
process.WaitForExit();
Console...
I'm not looking for a way to associate values with a thread using the 'SetData' method.
I need to store some kind of data that will only exist during the scope of a calling method, could be the immediate parent or any other call that is made down on the stack.
For example:
void SomeMethod()
{
string someInfo = "someInfo";
SomeOth...
I was just looking into the source code of an existing project which uses nHibernate and found that there are interfaces created for each entity classes. E.g ICustomer for Customer class. I was just wondering what can be the advantage of this pattern as ICustomer contains mainly the properties and very few methods.
...
I need to check if entire given input matches given pattern.
But wrapping a pattern in ^/$ feels like a hack.
Is there a shortcut for:
var match = Regex.Match(myInput, "^" + myPattern + "$");
?
...
We have REST WebService. It makes request to other server, process result and returns it to user.
Is there any benefit to make request to server2 asynchronous?
...
Hi there,
I have been struggling with unhandled fatal exceptions within an application that uses an external COM library. Enabling unmanaged code debugging magically turns the indescript fatal exceptions into well-defined, catcheable, exceptions.
I can now go ahead and change my code so that these exceptions never occur, but is there ...
I have a basic page to which I'm adding an uploader control based on Bulk Uploader at c-sharpcorner.com and the control is in a jQuery-faded div based on yesdegisn
The Bulk Uploader has two server side event handlers for two buttons--Add and Remove. After clicking these buttons, the fade disappears and you're back to the basic page--if ...
I keep getting a InvalidCastException when I'm fetching any double from my SQLite database in C#. The exception says "Specified cast is not valid."
I am able to see the value in a SQL manager so I know it exists. It is possible to fetch Strings (VARCHARS) and ints from the database. I'm also able to fetch the value as an object but then...
I cant find it, I have looked in the project properties but it seems to be missing, does anyone knows what I'm missing here?
...
Hello,
After spending a good 3 to 4 hours on google trying to find any solution to my problem I haven't had much luck.
Basically, we use crystal reports for our .NET applications with a sql server back end, we have many clients each with their own server and so our reports need to have their connections dynamically set. Up until a wee...
I have two dictionaries with the same structure:
Dictionary<string, int> foo = new Dictionary<string, int>()
{
{"Table", 5 },
{"Chair", 3 },
{"Couch", 1 }
};
Dictionary<string, int> bar = new Dictionary<string, int>()
{
{"Table", 4 },
{"Chair", 7 },
{"Couch", 8 }
};
I'd like to sum the values of the dictiona...
I have an application that runs on both C# .Net and Java. Two entirely separate but identical code bases. The problem Im having is formatting date and numbers.
For example: A user running the .Net variant is inputting a date and a format string. The 26th of April 1986 is formatted 1986-04-26. The actual date, along with the format stri...
I have written a tool that references Microsoft.TeamFoundation.VersionControl.Client.dll, which is a 32-bit DLL.
When I build my tool on 64-bit Windows, I set Visual Studio to specifically target X86 in order to force it to a 32-bit build.
Targetting X86 instead of All-CPU's prevents me from getting a BadImageFormatException, as long a...
Guys,
I want to customize the look of a TextBlock. (I want a rounded rectangle border around it).
But I'd like to be able to set it's template via the app.xaml
But I see that TextBlock doesn't have a Template property. I'd use Label (which does have a Template property) but I guess silverlight doesn't support a Label control.
So what ...
I have been provided to a wsdl file by another business to build webservice so that the other business can connect to service I build using the provided wsdl and xsd files. I am dot net developer using wcf. I want to know where to start having the wsdl and xsd files in hand.
Thanks
...
Has anyone been able to get oAuth working with the gMail feed using the DevDefined oAuth library?
I'm having a really hard time figuring out how to get this working. Seems like I either get a 401, or 411 returned.
I used this as a template, but it doesnt appear to be as easy as entering in the google token endpoints
string OAuthReque...
I have written a C# server application which uses Deusty.net AsyncSockets (great project by the way!) and I'm running into a very strange problem.
All the events are being processed correctly including DidRead, giving me a valid sender (IP address etc) but when it comes to disconnections, I get a strange situation where the socket data ...
I am trying to create a common service library shared between a WCF web service and a local data service. However, when trying to utilize the service by clicking on
Project -> Add Service Reference
and then trying to use the base interface instead of the proxy interface I get a cast error with the following code:
IMyService _con...