.net

Logic to skip repeating values in a variable

i have a loop where a variable value will change in each loop and display those values in each loop. i need to skip the display of the value if the same value repeats from second time ...

How to eliminate the "Access is Denied" error when calling OBIEE Web Services SOAP API?

I have successfully used the HtmlViewService in the OBIEE Web Services SOAP API to pull back HTML for an Answers report (using C#/ASP.NET). For some reason, they are using an iframe to call the SOAP API and return the bulk content of the report (I was hoping to just get the raw HTML, but I'll save the grief for another day). Anyways, whe...

What is the equivalent to Java's canvas object in C#?

I'm working on creating a basic application that will let a user draw (using a series of points) and I plan to do something with these points. If this were Java, I think I would probably use a canvas object and some Java2D calls to draw what I want. All the tutorials I've read on C#/Drawing involve writing your own paint method and add...

WPF/.NET data access models - resource recommendations

We're in the early design/prep phases of transferring/updating a rather large "legacy" 3 tier client-server app to a new version. We’re looking at doing WPF over Winforms as it appears to be the direction Microsoft is pushing development of the future and we’d like the maximize the life cycle/span of the apps. That said during the rewri...

Why doesn't my ClickOnce deployment pick up the latest changes to the application?

I have a WinForms app which is deployed to a local network drive (as 'Online Only') via ClickOnce. This has been working fine but today I made some changes to the application and attempted to ClickOnce deploy it to a separate network location (to use as a test system) rather than the current production location. ClickOnce publishes suc...

How do I register a server side click on an HTMLGenericControl?

I'm looking for a reliable mechanism to generate a server side postback handler for an HTMLGenericControl such as an li element. I have some markup that I do not wish to change and would prefer to treat this in the same fashion as a standard .Net server control. Also, I know I can use a template based control to place some .Net contr...

Create flow diagram programmatically

I want to visualize components and connections of a HVAC system with .NET/C#. The diagrams will just include a few different components and their connections. They do not have to comply to any formal standard and should look alike the diagrams attached. In addition the user should be able to select a single component/connection (so that ...

Best Data Access Model for WinForms applications

Which data-access model has the best performance and speed for a C# Winforms application? Dataset? NHibernate? Entity Framework? Why would people say not to use Datasets ? ...

My C#.NET application is running slower when the exe is located on the network

Hi, My C#.NET application is running much slower when the exe is located on the network. And I'm talking about everything, even the graphical dispay is slower. For example: when a form is already loaded, if I unplug my network cable and minimize and maximize the window, it takes a very long time to redraw itself (whether the cable is p...

What is the analog for .Net InvalidOperationException in Python?

What is the analog for .Net InvalidOperationException in Python? ...

How to use the Request URL/URL Rewriting For Localization in ASP.NET - Using an HTTP Module or Global.asax Code

I wanted to see if there is a way to use the request URL/URL rewriting to set the language a page is rendered in by examining a portion of the URL in ASP.NET. We have a site that already works with ASP.NET’s resource localization and user’s can change the language that they see pages/resources on the site in, however the current mechani...

Should we create Virtual Machine environment so a consultant can develop in similiar environment?

This is a large project and currently there are only 3 developers working on it. We have some money in the budget to contract development help from a software consulting firm. However, because the location of our business it would be beneficial if the consultant could do their development off-site. Also, our company policy doesn't allow ...

Silverlight and Active Directory Interaction

I am planning to familiarize(read teach) myself with Silverlight by building an in-house app for managing our employees. I, obviously, would need this to interact with Active Directory on some level. What are my options? Has anyone tried this before? I am currently going to explore using Services(WCF???) to do the AD interaction ...

How to access Linux directories/files from a Windows Service using C#

Hi, I have a C# Windows Service that needs to access to a Linux computer to get a list of files in a particular directory. What .NET 3.5SP1 method would one use that allows me to do this? Thanks. ...

.net ViewState in page lifecycle

I have a page containing a control called PhoneInfo.ascx. PhoneInfo is dynamically created using LoadControl() and then the initControl() function is called passing in an initialization object to set some initial textbox values within PhoneInfo. The user then changes these values and hits a submit button on the page which is wired up t...

Can LINQ-to-SQL omit unspecified columns on insert so a database default value is used?

I have a non-nullable database column which has a default value set. When inserting a row, sometimes a value is specified for the column, sometimes one is not. This works fine in TSQL when the column is omitted. For example, given the following table: CREATE TABLE [dbo].[Table1]( [id] [int] IDENTITY(1,1) NOT NULL, [col1] [nvarch...

Load Balance WCF and Share a Remote MSMQ for High Throughput

After a ton of reading in books and on the web, I have noticed hints of information that WCF and MSMQ can be used in achieving high throughput. The information I have seen mentions using multiple WCF services in a farm that reads from a single MSMQ queue. The problem is that I have found paragraphs here and there that mentions that hig...

Recursively parse XmlDOcument

I have an XML document as follows: <directory> <file><monitored>0</monitored> <xferStatus>1</xferStatus> <name>test1.txt</name> <size>7</size> <created>03/31/10 11:30:02 AM</created> <modified>03/31/10 11:30:00 AM</modified> <tPathList><tPath>http://hwcdn.net/p2f4h2b5/cds/testing/test1.txt&lt;/tPath&gt; </tPathList> <tPath>http://hwcdn....

How does HttpContext.Current work, providing context appropriate state off a static variable?

I've always wondered how you can access the correct state of the current http context via a static method: HttpContext.Current.Session["foo"] = "bar"; In any other program, anywhere else, my initial assumption about working with a static accessor like this is that changing it will change it across all threads. Similarly, another thre...

C++/CLI DLL on C# doesn't compile

I wrote a wrapper DLL for some native c++ functions and compiled it in c++/CLI, then I added a reference to C# project, functions indicates there, but when I try compile project I get this error: "Additional information: Could not load file or assembly 'lib, Version=1.0.3742.39593, Culture=neutral, PublicKeyToken=null' or one of its depe...