Easy way to convert View to String. RRS feed

  • Question

  • User1052024640 posted

    These days I am working hard on SEO by asp.net core.

    I have a page which keyword is A, and it has a synonym that is B.

    Keyword A has a View already.

    Now I am about to create a new page which bases on A while all the words "A" on the new page will be replaced with B.

    In my opinion, I should do it like this:

     public IActionResult APage()//Keyword A page
                return View();

     public IActionResult BPage()//Keyword B page
               string i=//some logic to convert A page to string.
                return View(i.Replace("A","B"));

    Now the problem is I can hardly get a way to convert the A Page to a string.

    There are some ways in google while it seems all of them need a huge work.

    Is there any easy way to achieve this? Or is there any better way to solve my feature? Thank you.

    Thursday, November 19, 2020 8:17 AM


All replies