.net

Crystal Reports - How to suppress a page header on the first page of a group?

I have a report where each group is about 5-7 pages long. I need to suppress the page header on the first page of each group How can I do this? Thanks ...

Crystal Reports - How do I reset the page count for each group?

How do I reset the page count per group in my report? Each group contains about 5-7 pages worth of data. Thanks ...

How should the Form.Load event be used compared to its constructor method?

When initializing properties of controls or other values related to a Form I have a tendency to switch back and forth between initializing the values in the Form's constructor and then later when the Form.Load event is evoked. What is the generally accepted usage of a Forms constructor vs it's Form.Load event? With other classes I would...

what is the best way to gather data from employees inside the company?

we have about 200 employees i need to help HR to automate stuff one of the things that they need is to gather information from employees before they interview and after they become an official employee GOOGLE FORMS is one way to do it but can anyone recommend a very simple out of the box way to push forms to different employees insid...

Opening byte[] as a file without actually saving it as a file first

What is the best way to open a Word file that was stored as a byte[] in a database? I have to store some documents in an Access database - Word files, 2003 and up - on an application that is strictly run off of a CD. Unfortunately they have to be in the database and can't be stored loose in folders. I'm storing them as an OLE object, an...

How to create PDF files from .Net application without needing Adobe installed

We are developing a windows-based .Net application for distribution. This application has spreadsheet controls that we allow the user to print (essentially like printing a excel worksheet). Our requirement is for our application to create PDF's of our reports, and also to merge multiple pdf's into one file, without the end-user of our ...

Strange Inheritance Issue with C# classes

public class DTOa { public int Id { get; set;} public string FirstName { get; set;} } public class DTOb: DTOa { public string Email { get; set;} public string Password { get; set; } } public class a { protected DTOa _DTO = new DTOa(); public int Id { get { return _DTO.Id; ...

WCF custom binding issue

I have defined a custom binding in my client and server web.config file, but when I try to connect I get this error, server is running IIS 7 Content Type application/xml; charset=utf-8 was not supported by service http://localhost/contentservice.svc/PairService. The client and service bindings may be mismatched. Server: <system.se...

Match a character outside of a c-source style string

I have a text which essentially a c-style source file. I need to match a specific character, lets say ':' only when it's outside of a string. Example: void main() { int x = rand() % 2; printf(x ? "heads : tails" : "tails : heads"); // I want to match this ---^ character, but not others } For specificity sake I'm using .N...

multi email send

I am using the below code, and it only sends one email - I have to send multiple emails. For getting more than one email I use: string connectionString = ConfigurationManager.ConnectionStrings["email_data"].ConnectionString; OleDbConnection con100 = new OleDbConnection(connectionString); OleDbCommand cmd100 = new OleDb...

Database Custom Profiler FOr .Net or Java

Microsoft provided us a way to create our own profiler by using Microsft.* namespaces. I can trace all queries going to any MS SQL instance. I need to do this on MySQL as well. Is there any api available for .net or java to do this? If anyone can provide also a working code is very much appreciated thanks alot. ...

Best method for comparing windows directory names

Possible Duplicate: How can I compare (directory) paths in C#? I have a filename and a directory name and I want to determent if the file is in the directory. My first thought was to use string comparison and check that the filename string starts with the directory name string. However, that would fail in the case where the di...

creating WCF ChannelFactory<T>

I'm trying to convert an existing .NET Remoting application to WCF. Both server and client share common interface and all objects are server-activated objects. In WCF world, this would be similar to creating per-call service and using ChannelFactory to create a proxy. I'm struggling a bit with how to properly create ChannelFactory for AS...

What is the correct way to implement a Managed Property Handler Shell Extension?

Now that .NET CLR 4.0 supports side by side (SxS) operation it should now be possible to write shell extensions in managed code. I have attempted this and successfully coded a Property Handler that implements IPropertyStore, IInitializeWithStream and IPropertyStoreCapabilities. The handler works fine and is called as expected when...

How to associate unique threadID per execution with log4net output?

I'm using log4net, and when i log messages my threadID will be duplicated inside my file.. i want it to be a uniqueID whereby it never exists twice in the file so that it will make it easy for searching. I hope this is coming out right. basically my conversion pattern includes these items <conversionPattern value="%date [%hex_thread] ...

Entity Framework Tips, Tricks and Gotchas

Are there any ? ...

Enterprise Library Logging 4.1 does not write to errors listener when file is inaccessible

We have Enterprise Library 4.1 logging set up to write to the Event Log when regular logging fails. This works fine when logging is configured incorrectly (e.g. an invalid character in the listener fileName attribute), but nothing is written to the event log when the configured file cannot be written to due to invalid permissions. FWIW...

.Net Regex replace text between 2 delimiters inclusive/exclusive delimiters with something else

Field1: Unknown1 Field2: Unknown2 Field3: Unknown3 In my case I want to exclude row starting with "Field2:" which is effectively start marker "Field2:" end marker "\n" and replace with '' including delimiters. Or what would be regular expression if I wanted to replace Field2: Unknown\n with Field2: SomethingElse\n ...

Web service reference problem in Windows service

I have a Windows Service which runs a Web Service code in a library. The structure is like this: MyWindowsService.exe (references to MyServiceLibrary.dll) MyWindowsService.exe.config MyServiceLibrary.dll (references to web service) MyServiceLibrary.dll.config (contains endpoint information about the web service) The process is like th...

How to Add asp:silverlight in ToolBox Visual Studio 2008?

I am using VS2008,I can not able to see the asp:silverlight (to embed my silverlight file in aspx page) , How can i get it in my toolbox. ...