.net

How to get the subclass of an object?

Given this example: Public Class Car End Class Public Class Vovlo Inherits Car End Class Public Class BMW Inherits Car End Class When I receive a Car object, how can I determine if the Car object is a Volvo, a BMW or a Car? I know I can use TypeOf, but when there are several classes that inherits from the Car class, this b...

List tables involved in a sql statement before it is run?

Is it possible, in .NET, to pass a sql statement to SQL server for parsing and return the tables involved in the statement and the type of operation. So for a statement like this : select * from Table1 left outer join Table2 on Table1.id=Table2.foreignid; delete from Table2 where date < 2009/12/12 SQL Server might return the tables in...

Meet with error -- "Updates are currently disallowed on GET requests"

Hello everyone, I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I have deployed a publishing portal. I am developing a ASP.Net web application using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SharePoint Server 2007 SDK. Here is my code snippets and I got error -- "Updates are currently disallowed on GET req...

How to draw a grid in WPF

I'm trying to create a user control in WPF to represent a Go board, which is essentially just a grid of black lines with dots on some of the intersections. At the moment I'm using a Grid control to handle placement of the stones, but one of the difficulties is that the stones are placed on the intersections of the gridlines rather than ...

Getting all the anchor tags of a web page

Given a web URL, I want to detect all the links in a WEBSITE, identify the internal links and list them. What I have is this: WebClient webClient = null; webClient = new WebClient(); string strUrl = "http://www.anysite.com"; string completeHTMLCode = ""; try { ...

.net open source component for diagraming in mono?

i need a .net open source component for diagraming in mono? , i mean a component to do diagrams in qt ...

What DLL is the Bind(Of T) from Ninject located in.

I am using .Net 3.5 and a console application that eventually will become a windows service. Most of the examples I find use something like Bind<IWeapon>().To<Sword>(); I have included all the DLL as references in my project and I the compiler is still complaining. Any clues of where I am going wrong? Sorry this might be a stupid qu...

Regular Expression with foreign languages

I have a function that I have used a bunch of times in various files which has a signature like: Translate("English Message", "Spanish Message", "French Message") and I am wanting to pull out the English, Spanish and French messages and then output them into a csv so that people who actually know these languages can tell me what I SHO...

.NET Outlook Add-in: attaching a sent email item to a journal entry

So I'm developing an outlook add-in that basically gathers some info from the user in the form, then sends a properly formatted email to the right person. What I want to do is then make a journal entry noting that the email had been sent, and attach the email in reference. To accomplish this manually, I can go to the "Sent Items" folder...

Populate a TreeView from an object

I am having a problem with a treeview in my WinForm app. I created a TreeViewItem class that holds the data. There are only 5 fields: CaseNoteID, ContactDate, ParentNoteID, InsertUser, ContactDetails. public class TreeItem { public Guid CaseNoteID; public Guid? ParentNoteID; public string ContactDate; public string Ins...

Permissions for writing a file

Hello, I've the following issue I've a windows application It calls a remote web service (for authentication) It in turns call a web service (in the same remote machine) (to get a licensed file) It saves the licensed file in All Users/Application Data in the system where the application is running Which permission is used for saving...

Access denied error

Hi I am trying to delete the excel file from a specipic location . but can't deleting. having error : Access to the path 'C:\mypath\sample.xlsx' is denied. I write a code as : protected void imgbtnImport_Click(object sender, ImageClickEventArgs e) { try { string strApplicationPath = HttpContext.Current.Request.MapPat...

How can I remove all events from the Application Event Log for just one source?

I'm using the application event log to write messages about activity happening in my program. I set the source to the name of my app. I would like to offer the user the ability to clear just the events related to my program. Is this possible? I only see a way to clear the whole log. I'm using c# in .NET 2.0. ...

How to create a Consumer .NET client using FluorineFx?

Hi All, I'm trying to create a .NET consumer client that will connect to a FluorineFx RTMP Service. It was very easy to create a Flex consumer client and I wish to create the same in .NET (In other words how to connect a MessageAdapter to MessageAdapter?) Many Thanks, Dudi ...

How to get all classes in current project using reflection?

How can I list all the classes in my current project(assembly?) using reflection? thanks. ...

Possible architecture pitfalls

I am currently building a fairly complex CRM / POS system which has the following requirements: System needs to be able to be installed on a single machine (PC) System needs to be able to be installed on 1 machine that can act as a server, and be accessed by several client machines (local network, wired and wireless) System needs to be...

Impersonation in windows application

Hello, I've written an extremely simple program to load an xml from one path and store it in All Users/Application Data. But i'm getting access denied error. So i want to impersonate the admin account and save the file. How to do that? Thank you. Regards NLV ...

What to pass to the lock keyword?

What is the difference (if any) between using void MethodName() { lock(this) { // (...) } } or private object o = new object(); void MethodName() { lock(o) { // (...) } } ? Is there a difference in performance? Style? Behaviour? ...

Adding/Updating/Deleting Exchange Calendar entries externally?

I'm trying to see how it would be possible to externally maintain a user's (or users') Outlook calendar using .NET. We use a CRM for various sales and account management appointments, and now they need a seamless way of integrating the CRM events with the Outlook events. Is Exchange writable via web services or would this need to be do...

Is this WSP uninstallation script complete?

I am using the following script for uninstallation of a wsp workflow feature. Please can someone check and confirm that it contains all the required steps for the uninstallation or not. I am doubtful because when i run this uninstallation script and install the new version of the wsp; the workflow still behaves similar to what it did wi...