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. html cleanup

html cleanup

Scheduled Pinned Locked Moved ASP.NET
htmldatabasequestion
8 Posts 4 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.
  • D Offline
    D Offline
    Dhyanga
    wrote on last edited by
    #1

    Hi all, i inserted my data into the database with the html tags. I am trying to show those data in the gridveiw but without html tags. Is it possible to do this ? Any Ideas ??

    suchita

    N H 2 Replies Last reply
    0
    • D Dhyanga

      Hi all, i inserted my data into the database with the html tags. I am trying to show those data in the gridveiw but without html tags. Is it possible to do this ? Any Ideas ??

      suchita

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You obviously need to strip the html elements either going to the or coming from the database. Use a RegEx to find and remove them from the text. What issues are you encountering?


      I know the language. I've read a book. - _Madmatt

      D N 2 Replies Last reply
      0
      • N Not Active

        You obviously need to strip the html elements either going to the or coming from the database. Use a RegEx to find and remove them from the text. What issues are you encountering?


        I know the language. I've read a book. - _Madmatt

        D Offline
        D Offline
        Dhyanga
        wrote on last edited by
        #3

        when i was showing in the datagrid, because of some html tags, the starting text is not aligned. Some are left aligned of the cell, while some are right aligned and some are center. I want the uniformity in all when they are displayed in the datagrid.

        suchita

        N 1 Reply Last reply
        0
        • N Not Active

          You obviously need to strip the html elements either going to the or coming from the database. Use a RegEx to find and remove them from the text. What issues are you encountering?


          I know the language. I've read a book. - _Madmatt

          N Offline
          N Offline
          NeverHeardOfMe
          wrote on last edited by
          #4

          Mark Nischalke wrote:

          Use a RegEx

          um... you might want to read this rant[^]... [edit] This[^] exposition of it is also interesting

          N 1 Reply Last reply
          0
          • N NeverHeardOfMe

            Mark Nischalke wrote:

            Use a RegEx

            um... you might want to read this rant[^]... [edit] This[^] exposition of it is also interesting

            N Offline
            N Offline
            Not Active
            wrote on last edited by
            #5

            Just that, a rant. The response of Chuck Norris can do it is spot on though. :-D


            I know the language. I've read a book. - _Madmatt

            1 Reply Last reply
            0
            • D Dhyanga

              when i was showing in the datagrid, because of some html tags, the starting text is not aligned. Some are left aligned of the cell, while some are right aligned and some are center. I want the uniformity in all when they are displayed in the datagrid.

              suchita

              N Offline
              N Offline
              Not Active
              wrote on last edited by
              #6

              If you want uniformity in alignment then make it happen. You are in complete and absolute control of the html that is rendered.


              I know the language. I've read a book. - _Madmatt

              1 Reply Last reply
              0
              • D Dhyanga

                Hi all, i inserted my data into the database with the html tags. I am trying to show those data in the gridveiw but without html tags. Is it possible to do this ? Any Ideas ??

                suchita

                H Offline
                H Offline
                Hiren solanki
                wrote on last edited by
                #7

                I found this Regex to detect HTML Tags. \<\/?\w+\>* Literal <

                • Literal /,zero or one repetations
                • Alphanumeric, one or more repetitions
                • Literal >
                  Which Matches to almost HTML tags, Just replace matched string with Empty of "" String. and you will get plain text as a OUTPUT I think. [Add] See my recent TIP[^] on CP for that. [/Add]

                Regards, Hiren. Microsoft Dynamics CRM

                My Recent Article: - Way to know which control have raised PostBack[^]

                modified on Wednesday, December 15, 2010 8:52 AM

                D 1 Reply Last reply
                0
                • H Hiren solanki

                  I found this Regex to detect HTML Tags. \<\/?\w+\>* Literal <

                  • Literal /,zero or one repetations
                  • Alphanumeric, one or more repetitions
                  • Literal >
                    Which Matches to almost HTML tags, Just replace matched string with Empty of "" String. and you will get plain text as a OUTPUT I think. [Add] See my recent TIP[^] on CP for that. [/Add]

                  Regards, Hiren. Microsoft Dynamics CRM

                  My Recent Article: - Way to know which control have raised PostBack[^]

                  modified on Wednesday, December 15, 2010 8:52 AM

                  D Offline
                  D Offline
                  Dhyanga
                  wrote on last edited by
                  #8

                  Problem is solved already....

                  suchita

                  modified on Wednesday, December 15, 2010 3:32 PM

                  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