Counting no of characters in MS Word file
-
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
-
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
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.