Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Pita32

@Pita32
About
Posts
6
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • saving a Word Doc from address bar in .net/C#
    P Pita32

    Hi Richard - Yes this indeed is a Word document, which is the problem. I get the Word document from the user via a popup modal, via the statement

    HttpPostedFileBase filecontent = Request.Files[0];

    it's when I try to do the save

    filecontent.SaveAs(fullpath);

    where it fails, as it writes out a blank document. Could you give me an idea or example of your read and write bytes proposed solution? I'm not familiar. Thanks, appreciate it.

    C# csharp help tutorial question

  • saving a Word Doc from address bar in .net/C#
    P Pita32

    I've got a situation in my .Net application where I have a popup modal where the user will select a Word document and my process will save it to a repository under a different standardized name. To get the input file from the address bar:

    HttpPostedFileBase fileContent = Request.Files[0];

    Then the save:

    fileContent.SaveAs(fullPath);

    Unfortunately the SaveAs does not work, as when you get the Word Document from the Response object, it blanks it out when doing the SaveAs. So what I need to do is get the Word Document that the user selected, and save the contents of that Word Document to a Word Document with a different, standardized name. so what I have so far is

    using (var documentReader = new StreamReader(fileContent.InputStream))
    {
    var readDoc = documentReader.ReadToEnd();
    }

    I know my readDoc variable contains the selected Word document contents, and it appears to do the ReadToEnd correctly, the problem now is, I need to be able to save those contents stored in readDoc to a different Word Document with a different name. Any ideas on how to go about this?

    C# csharp help tutorial question

  • traversing two lists simultaneously
    P Pita32

    suppose you have two lists of the same size, i.e. same number of elements List a, List b is it possible to traverse the two lists simultaneously and compare the values? Element 1 in list a to element 1 in list b, element 2 in list a to element 2 in list b, etc. I use a Foreach when traversing lists, but am unsure of how to do a side by side comparison of list b when I am traversing list a. Thanks

    C# tutorial question

  • Splitting large amounts of data in a table
    P Pita32

    Is there a way to split data into two separate tables with a single SQL statement? I know that sounds like an odd question, but I have a large table in terms of rows, and I would like to "split" the data into two separate tables for separate processing in parallel fashion. Call me crazy but I thought there was a way to do that in SQL Server, i.e. a SQL statement to divide the table into two separate tables. Is there a way to do that or am I misremembering?

    Database question database sql-server sysadmin

  • Linq query question
    P Pita32

    V

    LINQ csharp database linq question

  • String reversal algorithm
    P Pita32

    Ttt

    Algorithms algorithms
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups