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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Counting no of characters in MS Word file

Counting no of characters in MS Word file

Scheduled Pinned Locked Moved ASP.NET
csharpquestiondotnetvisual-studiohelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tirthadip
    wrote on last edited by
    #1

    hi, I have to upload a MS Word file from client machine in a page.After that I have to count the total no. of characters of that particular Word file. I have already written code to upload the file and save.It is working fine.But before saving how can I count the total no. of characters??? And again will there be problem if multiple users try to upload files at same time. I am using .NET framework 1.1 and visual studio 2003 Please give me some link or idea. Thanks in advance. Tirthadip Live life to the fullest

    K 1 Reply Last reply
    0
    • T Tirthadip

      hi, I have to upload a MS Word file from client machine in a page.After that I have to count the total no. of characters of that particular Word file. I have already written code to upload the file and save.It is working fine.But before saving how can I count the total no. of characters??? And again will there be problem if multiple users try to upload files at same time. I am using .NET framework 1.1 and visual studio 2003 Please give me some link or idea. Thanks in advance. Tirthadip Live life to the fullest

      K Offline
      K Offline
      Kapil Thakur
      wrote on last edited by
      #2

      i dont know any direct solution but there is a work-around. put a textbox (invisible) on the page. before uploading, put the text from the word file on the textbox. attach javascript to that textbox for counting characters. if characters are more than your limit of characters. show error message or whatever you want to code. javascript for it : function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) { field.value = field.value.substring(0, maxlimit); } else { countfield.value = maxlimit - field.value.length; } } i hope this is what you were looking for..... a cigarette reduces 2 minutes from ur life while a working day reduces 8 hours.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

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