I am stuck with the Radiobuttonlist not working despite the autopostback="t rue" . It is strange because it was working well previously. I did not make any change to the code. Here is the code that I am using.
If staple value="5" is checked, it should make the div staplelocation visible.Code behind is also available below.
Can we write code to count pages in a file irrespective of its type?
Hello,
I have to count the number of pages in the document that I am uploading. This document can be a word file, xls, txt or pdf. I have my code working for pdf but not for other types. Here is the code that works for pdf- it uses regex
Code:
System.IO.FileStream fs = new System.IO.FileStream(filepath, System.IO.FileMode.Open, System.IO.FileAccess.Read);
System.IO.StreamReader r = new System.IO.StreamReader(fs);