locked
Read All Pages in Solution RRS feed

  • Question

  • Hi, i want to read all pages like .cs, .aspx, .js,.xml etc. in a solution. I want to  read the pages one by one  search for a string. Or i can read all the pages from their physical folder . I want to know how can i do this?


    learnerbm
    Monday, August 25, 2008 6:48 PM

Answers

  • Hello,

    You can use ProjectItem interface and VSWebProjectItem Interface (VsWebSite) access a web project item and get the physical file, then open the file to search the string. And please read the following references to get started.
    VS 2008 VB specific web p... - Contained an example using VSWebProjectItem Interface.
    How do I access the Solut... - Example of using ProjectItem.

    Hope this can get you started.

    Thanks.




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Proposed as answer by Feng Chen Wednesday, August 27, 2008 3:27 AM
    • Marked as answer by Feng Chen Friday, August 29, 2008 8:19 AM
    Wednesday, August 27, 2008 3:27 AM
  • Ed has posted an detailed answer for this question in another thread:
    Find All Pages With Macro

    I post it here for your convenience.

    Thanks.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Feng Chen Friday, August 29, 2008 8:19 AM
    Friday, August 29, 2008 7:19 AM

All replies

  • Hello,

    You can use ProjectItem interface and VSWebProjectItem Interface (VsWebSite) access a web project item and get the physical file, then open the file to search the string. And please read the following references to get started.
    VS 2008 VB specific web p... - Contained an example using VSWebProjectItem Interface.
    How do I access the Solut... - Example of using ProjectItem.

    Hope this can get you started.

    Thanks.




    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Proposed as answer by Feng Chen Wednesday, August 27, 2008 3:27 AM
    • Marked as answer by Feng Chen Friday, August 29, 2008 8:19 AM
    Wednesday, August 27, 2008 3:27 AM
  •  Hello I wil try it . Thank you so much.
    learnerbm
    Wednesday, August 27, 2008 6:16 AM
  • Hi,

    if i'll give some more detail ; i want to use a tool for my project but tool doesn't support multi language functionality. It is written in English but i want to convert it's warning messages or other user informations shown in an another language. By this i have to fasten down these messages and change them with their equivalent language forms. Thus, the files must be changed and user can understand. Now i don't know how can i do this . there are 2 choices that i thought ;

    1. I will use regular expressions  to find the strings and i will replace them in the files(this choice a bit dangerous because the files can damage )

    2. I will use visual studio macros but i don't know how can i do this ?

    Could you please help me how can i achive this problem ..


    learnerbm
    Thursday, August 28, 2008 10:57 AM
  • Ed has posted an detailed answer for this question in another thread:
    Find All Pages With Macro

    I post it here for your convenience.

    Thanks.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Feng Chen Friday, August 29, 2008 8:19 AM
    Friday, August 29, 2008 7:19 AM
  • Thanks

    Sincerely..
    learnerbm
    Friday, August 29, 2008 7:23 AM