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 show a document in the same format

How to show a document in the same format

Scheduled Pinned Locked Moved ASP.NET
tutorial
2 Posts 2 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.
  • K Offline
    K Offline
    Kurian_Kurian
    wrote on last edited by
    #1

    I want to show the history in the same format which is typing in the admin side.In the admin side i used textbox for typing the History,i written two ,three paragraphs from the admin side and save it.i will get correctly with the same format in the admin side,while saving am not using any trim.in the webside i used some controls label,table,datagris,datalist and textbox if am using other controls except text box this display continously.it will show like paragraphs.but when am using textbox i will get correctly.i don't want use textbox.why it is coming like this.is there any solution

    N 1 Reply Last reply
    0
    • K Kurian_Kurian

      I want to show the history in the same format which is typing in the admin side.In the admin side i used textbox for typing the History,i written two ,three paragraphs from the admin side and save it.i will get correctly with the same format in the admin side,while saving am not using any trim.in the webside i used some controls label,table,datagris,datalist and textbox if am using other controls except text box this display continously.it will show like paragraphs.but when am using textbox i will get correctly.i don't want use textbox.why it is coming like this.is there any solution

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Kurian_Kurian wrote:

      if am using other controls except text box this display continously.it will show like paragraphs.but when am using textbox i will get correctly.i don't want use textbox.why it is coming like this.is there any solution

      Datatgrid/Label will render the contents as plain HTML. When you type on textbox, it will have newline characters (\n). This won't be rendered correctly. That is making problem. So you need to replace \n with <br> to show the details correctly.


      My Website | Ask smart questions

      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