I am working on a WCF (.NET 3.5 target) service which exposes a number of methods to be consumed ultimately by InfoPath.
I have a simple DataContract which includes several members, one of which is an XElement:
[DataContract]
public partial class MyDataContract
{
[DataMember]
public string ObjectId {get; set;}
[DataMember...
I am attempting to launch a specific form depending on the selected node of a treeview on the doubleclick event. The code I need to use to launch the form is a little bulky becuase I have to ensure that the form is not disposed, and that the form is not already open, before launching a new instance. I'd like to have all of this checkin...
As I understand it, the .NET memory model on a 32-bit machine guarantees 32-bit word writes and reads to be atomic operations but does not provide this guarantee on 64-bit words. I have written a quick tool to demonstrate this effect on a Windows XP 32-bit OS and am getting results consistent with that memory model description.
However,...
If I manually create a DataTable with columns identical to an actual database table, is there any way I can merge my 'artificial' data rows with a DataTable populated from the DB? By merge I mean eventually a DB insert will be performed for 'artificial' rows that don't exist in the DB, and an update for 'artificial' rows that correspond...
I have an ASP.NET application using an entity framework model. In an import routine, with the code below, I get a "Cannot insert duplicate key" exception for AccountNum on the SaveChanges call, but when execution stops for the exception, I can query the database for the apparently duplicated field, and no prior record exists.
...
I'm going to make a small application for a business that will be used locally for scanning, and storing documents in a database located on the local machine or on a machine located in the same LAN.
I could create a table called Users with username and password and according to the usertype ID show a form, or another form. But I'm more ...
Hi... I'm creating a web form, where in there are around 12-15 Input Fields...
You can have a look at the screen and
The request is such that depending on the data the user selects in the Gridview and the DropDown list, the appropriate Textboxes and CheckBoxes needs to be displayed.
Some times the conditions are very direct, like wh...
I am a .NET developer looking for a job. I've talked to someone who works at Google and loves it there and I generally have a good feeling about working for that company because I love most of Google's products and services. But are they even interested in .NET developers? I had the impression they only use non-proprietary technologies.
...
I'm trying to add the ActiveX Microsoft Excel 11.0 Object library to my .NET project. It works fine on my computer, but when I check in my code, it doesn't work on my coworker's. Fixed it on his and it broke mine. When added, the namespaces are different between our machines.
It turns out the difference is that when I add the reference ...
I want to do a deepcopy in IronPython, but when I write
import copy
I get "no module named copy". How do I deepcopy in IronPython?
...
I have a dictionary collection as bleow:
mydic.addvalue(key1, val1)
mydic.addvalue(key2, val1)
mydic.addvalue(key3, val1)
mydic.addvalue(key4, val2)
mydic.addvalue(key5, val2)
From the above dictionary I want to delete all the entries where value == "val1", so that the result would have only following entry:
mydic.addvalue(key4, val2...
Hi,
I try to convert text file to xml file using following code. But i get error in line 12. Could any one correct it and give me the correct answer.
private void button1_Click(object sender, EventArgs e)
{
string[] lines = File.ReadAllLines("ex3.txt");
char[] ca = new char[] { '~' };
using (XmlTextWriter writer = new XmlT...
The code I'm writing receives an ArrayList from unmanaged code, and this ArrayList will always contain one or more objects of type Grid_Heading_Blk. I've considered changing this ArrayList to a generic List, but I'm unsure if the conversion operation will be so expensive as to nullify the benefits of working with the generic list. Curren...
I have a third party tool that creates an img tag through code using HtmlTextWriter's RenderBeginTag, RenderEndTag & AddAttribute methods. I want to get the resulting HTML into a string.
I tried the reflection method mentioned here but I get a error "Unable to cast object of type 'System.Web.HttpWriter' to type 'System.IO.StringWriter"...
I am getting the following error message when compiling or attempting to run my application on Windows 7 64 bit. I've scoured the internet and many people have the same error message however none of the solutions address my problem or situation.
Using VS 2010.
Error 38 Could not load file or assembly 'file:///D:/Projects/Windows Proje...
While designing applications it is a very good practice to have all the business logic in one place. So why then we sometimes have the business logic in stored procs? Can we fetch all data from the DB and store it in a DataSet and then process it? What would be the performance of the app in this scenario?
...
We are currently working on an API for an existing system.
It basically wraps some web-requests as an easy-to-use library that 3rd party companies should be able to use with our product.
As part of the API, there is an event mechanism where the server can call back to the client via a constantly-running socket connection.
To minimize ...
I'd like to implement zoom function while Ctrl key is pressed.
But the MouseWheel event is not trigger while the mouse is over the ScrollView.
Is there any way to do it?
ps:SilverLight 4.0
<UserControl x:Class="SilverlightApplication11.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:...
Hi,
I know this question has been asked here before, but I don't think those answers were adequate for my needs.
We have a SOAP webservice that is used for an iPhone application, but it is possible that we need an Android specific version or a proxy of the service, so we have the option to go with either SOAP or JSON. I have a few conc...
I am using Quartz.NET in an application. What is the proper way to dispose of Quartz.NET.
Right now I am just doing
if (_quartzScheduler != null)
{
_quartzScheduler = null;
}
Is that enough or should I implement a dispose or something in the jobType class?
Seth
...