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. how to fetch html text into string variable

how to fetch html text into string variable

Scheduled Pinned Locked Moved ASP.NET
htmldesigntutorialquestion
5 Posts 5 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.
  • A Offline
    A Offline
    Amit Spadez
    wrote on last edited by
    #1

    hello all, I want to fetch the static text written at html design page and then fetched data be entered into some variable at code-behind. could anyone know the code to do so?

    A P M M 4 Replies Last reply
    0
    • A Amit Spadez

      hello all, I want to fetch the static text written at html design page and then fetched data be entered into some variable at code-behind. could anyone know the code to do so?

      A Offline
      A Offline
      Arindam Tewary
      wrote on last edited by
      #2

      You might face problem of having some html into string variable. Please use the class "HttpUtility" and it method/property as required.

      Thanks, Arindam D Tewary

      1 Reply Last reply
      0
      • A Amit Spadez

        hello all, I want to fetch the static text written at html design page and then fetched data be entered into some variable at code-behind. could anyone know the code to do so?

        P Offline
        P Offline
        PSK_
        wrote on last edited by
        #3

        If content is inside a td/div/span/p then you can give the container control an Id and set its runat="server". At the server side you can access the control text using the InnerText or InnerHTML property.

        WWW, WCF, WWF, WPF, WFC .... WTF

        1 Reply Last reply
        0
        • A Amit Spadez

          hello all, I want to fetch the static text written at html design page and then fetched data be entered into some variable at code-behind. could anyone know the code to do so?

          M Offline
          M Offline
          MyDevBank
          wrote on last edited by
          #4

          Hi do you mean web scraping/harvesting ? April 1 - :laugh:

          1 Reply Last reply
          0
          • A Amit Spadez

            hello all, I want to fetch the static text written at html design page and then fetched data be entered into some variable at code-behind. could anyone know the code to do so?

            M Offline
            M Offline
            Mohan H Prajapati
            wrote on last edited by
            #5

            I think you have problem for getting server side error when enter html code in textbox. For the security reason asp.net does not allow this. But you can enable it by making <%@ Page validateRequest="false" %>

            Mohan

            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