I am writing a Web service client in C# which takes the URL of the web Service, and a web method name.
I want to check if thew Web method actually receives an int and returns a DataTable, and if this is true, it should call it and return the DataTable.
I have found a couple of posts where this is accomplished compiling dinamically the ...
I need to kick off a Sync() process whenever my windows form app is being closed. This sync's data between the local SQL instance and a network SQL instance.
What is the better event to place this in: Closed or Closing?
Are there any factors that might change it from one to the other, as far as being best practice?
As a bonus questio...
I'd like to take the following if possible and combine them:
public static T[] ForEach<T>(this T[] TArray, Action<T> doWhat)
{
foreach (var item in TArray)
{
doWhat(item);
}
return TArray;
}
The above handles array, below handles lists
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> TList, Action<T> action)
...
Hi,
I've got a strange problem concerning dynamically loaded controls in a asp.net application.
So there is a control where user have to select some items and/or do some text input (textboxes). The control depends on a single dropdown list element.
So user A chooses a certain value in this dropdownlist "controlselector" -> on of the m...
I'm creating a checkbox list to handle some preferences as follows...
<ul>
<%foreach (var item in ViewData["preferences"] as IEnumerable<MvcA.webservice.SearchablePreference>)
{
var feature = new StringBuilder();
feature.Append("<li>");
feature.Appen...
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 asked this question: http://stackoverflow.com/questions/935854/get-the-domain-name-of-a-wcf-request
Is it not possible to get the requesting domain from a WCF request? So for anonymous request that do not require authentication, how can I get the domain name?
...
I'm being told that the server we're being given to use has 2gb of ram but is nearly maxed out with the current main application that runs on it.
But for the site were building, which is wholly reliant on a web service, we need to pass the response to the previous request within a chain...
i.e.
Page One
var stepone = project.webservic...
3.5 SP1 was released, which also included 3.0 SP2 and 2.0 SP2. All three of these service packs potentially introduced a number of incompatibilities if you were using these versions of any of the frameworks and installed the update. There was a lot of bad press regarding the SP1 update and the number of issues it introduced. e.g. http://...
I heard there is a problem or a certain way you must setup IIS in order to run both .NET 2.0 and .NET 3.5 sites concurrently?
We don't see a .NET 3.5 option in the dropdown when configuring the site framework.
...
This might be a duplicate (question) but I am looking specifically for the .NET best practise.
How to store database connection strings, username and password etc. in a safe way? Is an encrypted app.config best in most cases?
I would also like to be able to set the password in the config file and then have it encrypted as soon as the a...
Let's say for example you have 5 different companies using the same platform (Windows based) all wrote their own web services, what technique using C# and .Net 3.5 would you recommend using to monitor all their different web services?
My intention is to build an application that provides visual feedback on service statuses to site admin...
I'm trying to set the width property of one of my controls to a qualifiedDouble,
as described here on MSDN.
(Scroll down to the "XAML Values" section to see MSDN's info on the use of a qualifiedDouble)
However, I want to know how to achieve this in the code-behind, rather than XAML. The UserControls I am creating do not have XAML atta...
Create a new ASP.NET MVC Web
Application
Create an ASP.NET App_Code
Folder
Inside the new
folder, create a class with an
Extension Method. For example:
static public class BugMVCExtension
{
public static int ToInt(this string str)
{
return Convert.ToInt32(str);
}
}
Choose a View and try to use this new Extension ...
When I instance my "Entities" object in Entity Framework, and make a couple of queries using that Entities object, what happens to connections?
Does it open a connection when I instance the object, and close it when I dispose of it?
Or does it open and close a connection for each single query I execute?
In either case, is it possible...
I am building a .NET application and considering deploying it through XBAP. This requires that the users have .NET 3.0 - 3.5 installed on their machine. Are there any kind of estimates of how many people have this? As a developer it's really hard to estimate. Any thoughts?
...
I have a class derived from System.Windows.Controls.UserControl, and I need to add a PropertyChangedCallback to the FrameworkElement.Margin dependency-property.
How is this accomplished from my C# code? I can't find any good examples of this in MSDN.
...
It seems that 3.5 was a big leap from 2.0. My workplace is still stuck on 2.0. What kind of fun am I missing out on by not being able to upgrade?
...
Hello all
I have read a few bits and bobs online about this topic but found none that work for me.
What I am trying to do is create a class of a runtime Type.
I use Activator.CreateInstance which works fine for classes with constructors that contain no arguments. For those with arguments it throws an exception, is there a way around t...
My web app exposes a few services (WCF) and I need to load an XML file and 'store' it a static variable visible to the entire AppDomain. That variable needs to be queried and updated from either a service or a page.
The thing is, I load that variable in the Application_Start (Global.asax.cs) but when a service request arrives the variab...