blah blah blah is here! blah blah » Close

0
votes
1 answers

iTextSharp trouble

foamy
2499

Hi all, I hope someone here has some experience with iTextSharp :) I'm trying to create a method that will send a PDF file directly to my printer (causing the print dialog to appear). Below is the code I've been working on. It works ...

1
votes
4 answers

Response.WriteFile returns the aspx page!

foamy
2499

Hi all, My code generates an excel file and should be sending it to the user for download. Instead, the user is getting the .aspx page as an .xls file! o.O Can someone shed some light on this? Many thanks in advance [code] Respons ...

0
votes
1 answers

Slow SQL query

foamy
2499

Hi all, I'm attempting to get some numbers from an XAL database (MS SQL Server 2005). My query is below. There are some conditions commented out. If I add either one of the lower ones the query executes in a matter of seconds but if I ...

0
votes
1 answers

C# Word Interop Search and Replace clears formatting?

foamy
2499

Hi all, Below is my code to do a search and replace through multiple files using Word Interop. The problem I'm facing is that the formatting (particularly paragraph and line spacing) gets reset when I use this code on my word file. Any h ...

1
votes
2 answers

C# overloads

foamy
2499

Hi all, I'm trying to make some overloads of some of my methods in my "toolbox" library. I have a method called ProcCheck that I want to be able to use with these overloads: [code] public static bool ProcCheck(string proces ...

1
votes
2 answers

C# HttpWebRequest timeout

foamy
2499

Hi all, I made this method to automatically check if a website is up or not. It runs every minute from a Console app and for the first few minutes it seems to work. After that I start getting "The operation has timed out" error ...

2
votes
3 answers

C# Printing HEX to file

foamy
2499

Hi all, I'm doing a project that involves sending a file to a major corporation. This file needs to contain a "EBCDIC HEX 1C" character as a segment terminator. I've tried using the code below, but apparently it ain't right :-/ ...

1
votes
4 answers

Compare a string against several values

foamy
2499

Hi all, this has been bothering me for a while now so I decided to ask. Is it possible, in C# (.NET 3.5) to compare one string against several values? The below code doesn't compile, but can this be done? [code] string s = Consol ...

2
votes
2 answers

ASP.NET control to allow user to enter data

foamy
2499

Hi all, I'm knee-deep in a project involving ASP.NET which I'm not that good at :) I have a collection of "working areas" gathered from a database. I need the user to enter "number of employees" and "total wor ...

1
votes
1 answers

File.Create clings on like a b******

foamy
2499

Hi all, Can anyone explain to me why this: [code] File.Create("foamy.txt"); File.ReadAllLines("foamy.txt"); [/code] produces a System.IOException and this: [code] using(StreamWriter sw = new StreamWriter(&quo ...

0
votes
1 answers

C# SizablePanel

foamy
2499

Hi all, I have this control, derived from Panel, called SizablePanel. I've created some properties to allow me to modify whether or not the user will be able to resize the top, bottom, left or right edge. The code for this looks like thi ...

1
votes
1 answers

C# E-mail formatting

foamy
2499

Hi all, I'm useless at regex, but for the task I'm currently working on it seems like the correct approach. I have a Windows Service (.NET 2.0) which needs to filter e-mail addresses. It will receive input in a format like these: [co ...

0
votes
0 answers

Displaying DataGridView clears DefaultCellStyle?

foamy
2499

Hi all, I have a project with a few DataGridViews in it. When the app starts it runs a BackgroundWorker for each DataGridView populating them and setting colors, fonts etc. depending on the data in the grid. The app has a RadioButton fo ...

1
votes
6 answers

Why is my Windows Service dying?

foamy
2499

Hi all, I have an issue with a Windows Service I wrote. This issue only comes up on one particular client's server and roughly once a day. The service is installed on about 40 servers, but this is the only place it happens :-S The iss ...

1
votes
3 answers

Draw simple graph on C# Windows Form

foamy
2499

Hi all, I've been googling and experimenting with graph tools for a few hours now, but I can't find one that does what I want and doesn't look like crap. I need a simple (indeed, very simple) graph on my Windows Form to visually displ ...

Feedback