Click here to Skip to main content
15,888,968 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do you enforce use of dedicated factories? Pin
lmoelleb8-Mar-12 1:39
lmoelleb8-Mar-12 1:39 
AnswerRe: How do you enforce use of dedicated factories? Pin
lmoelleb8-Mar-12 1:48
lmoelleb8-Mar-12 1:48 
Questionopen new tab in ie,mozilla and google chrome browers Pin
Rajkumartag6-Mar-12 0:02
Rajkumartag6-Mar-12 0:02 
AnswerRe: open new tab in ie,mozilla and google chrome browers Pin
Eddy Vluggen6-Mar-12 0:37
professionalEddy Vluggen6-Mar-12 0:37 
AnswerRe: open new tab in ie,mozilla and google chrome browers Pin
BobJanova6-Mar-12 0:41
BobJanova6-Mar-12 0:41 
GeneralRe: open new tab in ie,mozilla and google chrome browers Pin
Vasudevan Deepak Kumar9-Mar-12 9:59
Vasudevan Deepak Kumar9-Mar-12 9:59 
QuestionFile upload using http Pin
Sebastian T Xavier5-Mar-12 18:55
Sebastian T Xavier5-Mar-12 18:55 
AnswerRe: File upload using http Pin
Pete O'Hanlon5-Mar-12 21:43
mvePete O'Hanlon5-Mar-12 21:43 
Possibly the simplest way for you to do this would be to use the WebClient class. Here's a quick sample:
C#
private void SendFile(Uri address, string fileName)
{
  using (WebClient client = new WebClient())
  {
    client.UploadFile(address, fileName);
  }
}
If you supply an HTTP address as the first parameter, POST is used. The beauty of this method is that it's clever enough to use STOR if the address is an FTP address, so you get the best of both worlds here. The address has to be the fully qualified URI of the resource to receive the file; this means you have to give it the full address - so if you were writing a file called myfile.csv to http://localhost:3040/, you would need to supply http://localhost:3040/myfile.csv.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility


GeneralRe: File upload using http Pin
Sebastian T Xavier5-Mar-12 22:03
Sebastian T Xavier5-Mar-12 22:03 
AnswerRe: File upload using http Pin
DonDiegoDeLaVega5-Mar-12 21:49
DonDiegoDeLaVega5-Mar-12 21:49 
GeneralRe: File upload using http Pin
Sebastian T Xavier5-Mar-12 22:03
Sebastian T Xavier5-Mar-12 22:03 
QuestionMerge cell in datagrid C# Pin
daitranthanhhoa5-Mar-12 16:14
daitranthanhhoa5-Mar-12 16:14 
AnswerRe: Merge cell in datagrid C# Pin
Dave Kreskowiak5-Mar-12 16:18
mveDave Kreskowiak5-Mar-12 16:18 
QuestionWeb Browser to C# application Pin
TKCA5-Mar-12 15:54
TKCA5-Mar-12 15:54 
AnswerRe: Web Browser to C# application Pin
Dave Kreskowiak5-Mar-12 16:18
mveDave Kreskowiak5-Mar-12 16:18 
GeneralRe: Web Browser to C# application Pin
TKCA5-Mar-12 16:56
TKCA5-Mar-12 16:56 
GeneralRe: Web Browser to C# application Pin
Dave Kreskowiak5-Mar-12 17:03
mveDave Kreskowiak5-Mar-12 17:03 
GeneralRe: Web Browser to C# application Pin
TKCA7-Mar-12 2:24
TKCA7-Mar-12 2:24 
GeneralRe: Web Browser to C# application Pin
Dave Kreskowiak7-Mar-12 3:57
mveDave Kreskowiak7-Mar-12 3:57 
Questionrandom selection from a list Pin
james bradbery5-Mar-12 14:57
james bradbery5-Mar-12 14:57 
AnswerRe: random selection from a list Pin
PIEBALDconsult5-Mar-12 15:06
mvePIEBALDconsult5-Mar-12 15:06 
GeneralRe: random selection from a list Pin
james bradbery5-Mar-12 15:12
james bradbery5-Mar-12 15:12 
AnswerRe: random selection from a list Pin
RobCroll5-Mar-12 15:16
RobCroll5-Mar-12 15:16 
GeneralRe: random selection from a list Pin
james bradbery5-Mar-12 16:30
james bradbery5-Mar-12 16:30 
GeneralRe: random selection from a list Pin
RobCroll5-Mar-12 17:08
RobCroll5-Mar-12 17:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.