.net

communicator 2005 automation api?

i am all new to .Net .I am interested in writing an application in C#/VB/VB.net that will send the messages to all online peoples. I found The OFFICE Communicator api ,but unable to run the code that i found from MSDN site ( although code was for communicator 2007). did anyone did it before for Communicator 2005 ,please help me. than...

.net parsing Iso8601 date time

I have a string "2009-10-08 08:22:02Z" which is iso8601 format. How do I use DateTime to parse this format ? ...

Creating generic hashtables - C++

.NET framework has got a Dictionary<TKey,TValue> class which is implemented as hash tables and provides data retrieval in constant time (O(1)). I am looking for a similar implementation in C++. I know about std::map but in this data retrieval takes logarithmic time. Is there any good hash table implementation in C++ which will retrieve d...

How can I set up a Default Controller Route (When Controller name is not provided)?

I want to have URLs like below in my ASP.Net website: http://mysite/about http://mysite/faq http://mysite/bla I don't want to have a controller each for them. Is there any way I can set up a default controller scheme so that if a controller with a suitable name is not found, it will hit the default controller. Or is there an in-built ...

get submit button id

HiIn Asp.net form I have dynamically generated buttons, every button submits a form to, is there a way to get which button was submit the form in page load event? ...

Why does an unhandled exception not terminate a process while debugging?

This is a behavior I noticed several times before and I would like to know the reason behind that. If you run the following program under the (Visual Studio 2008) debugger, the debugger will keep breaking on the throw statement no matter how often you continue debugging. You have to stop debugging to get out there. I would expect that th...

What is the use of Tag property in Tree view control C#?

What is the use of Tag property in Tree view control C#? How can we work with it? ...

Get Xml Files on Website

How can i get xml files from a web site and save it on pc. what is easy way with C# ? ...

Pipelined image transformations in C#

I'm trying to optimize out image transformation code. We currently allow our users to upload and crop images, but we're working on adding rotation into the mix, and the resulting images must be resized into three different sizes, with watermarks applied. The code I took over repeatedly generated bitmaps in each step; this means allocati...

Sharepoint, how to know the kilobytes of the attachment without downloading it?

Hi. I have a list of elements in Sharepoint, they have title, description and the option to have an attachment. It's the classic list. I need to make a list of all these items, showing the kilobytes of the attachment. The problem is that I cannot do a FileInfo, because the only path I know is the URI path: http://xxx.com/../attachment...

problem with ToolStripSeparator

I have a toolstrip. For this toolstrip, I am adding ToolStripSplitButton and for this ToolStripSplitButton, I am adding toolstrip items, including ToolStripSeparator. In the click event of the toolstrip items I am retrieving items from the ToolStripSplitButton dropdown using below code. ToolStripDropDown tditems = ((System.Windows.Form...

[Solved] Autodesk Revit MEP 2010 .NET API C# room to door relation

Hello everyone, working with VS 2008 and Autodesk Revit MEP 2010 in C# i am trying to find out if a door is connecting to rooms: ElementSetIterator elementsetiteratorBIMDoors = bimdoors.getBIMDoors().ForwardIterator(); while (elementsetiteratorBIMDoors.MoveNext()) { Autodesk.Revit.Element elementDoor = elementsetiteratorBIMDoors.C...

Shared Business Rules for c# and Java objects

I've got a system that has Java server side objects and C# client objects. The objects can be modified in both sides of the system and so have business rules attached to them. The thing is currently the business rules only live on the server side, and I really want to avoid having to contact the server every time I want to verify the o...

Version number of a dll in .NET

Given the following: string file = @"c:\somepath\somefile.dll"; How can I find the file and product version numbers of that DLL using .NET? The dll can be either native or managed. Thanks. ...

Linq to SQL - How to inner join tables from different Data Context?

I have two tables from two different Data Contexts. Although both tables are from the same database, two separate datacontexts exist. Error msg: "The query contains references to items defined on a different data context." How can I get around this? Any help is appreciated. Thanks. ...

How can I ask Windows to print a document?

I want to (programmatically) print documents of various types, by asking Windows to do it (using the default associated application). How can I do this (in .NET or C++/Win32 API)? For example, if I have MS Office and Acrobat Reader installed on the machine, PDF files should be printed by Acrobat Reader, and DOC files should be printed b...

Does anyone have an example of creating a custom text marker in Visual Studio?

In case my initial approach is wrong, here's what I'm trying to accomplish. I want to be able to recognize snippets of text in my code editor (I'm using C#, but that shouldn't matter) and change the way they are formatted. Perhaps use different colors or fonts, etc. I started off thinking this would be as easy as popping a regular exp...

Prioritize section of IF statement

I've got an IF statement that validates data. Basically looks like this: Dim s As String = Nothing If s Is Nothing Or s.Length = 0 Then Console.WriteLine("Please enter a value") End If Console.Read() I'd like to check to see if it's nothing first because if I write it this way, it throws a NullReferenceException. I've thought ...

Cannot add ToolTip in style

I'm trying to add a ToolTip to a Grid using a Style (as follows): <ResourceDictionary> <Style x:Key="ToolTipGrid" TargetType="{x:Type Grid}" x:Shared="False"> <Setter Property="ToolTip"> <Setter.Value> <ToolTip> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> </Grid.Colu...

How can I display an image within the WPF Aero Glass Titlebar?

I have standard WPF Window that I have extended the Aero Glass on the top of the window around 50 pixels. I would like to keep the standard Min. Max. and Close buttons, Title Text and Window Icon. I would like to display a few small images (i.e. icons) in the title bar, around the middle of the title bar. How could I do this? WPF wi...