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. Line Break in Page.RegisterClientScriptBlock

Line Break in Page.RegisterClientScriptBlock

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
4 Posts 3 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.
  • J Offline
    J Offline
    jai_101
    wrote on last edited by
    #1

    Hi, I need to display the 3 Lines of text in the alert Box in asp.net code behind but '\n' is does not work. My coding is as follows Page.RegisterClientScriptBlock("", "alert('Please Enter Date \n Please Enter Intime \n Please Enter Outtime')"); If any one know the solution Please send it immediately. Bye. :((

    L 1 Reply Last reply
    0
    • J jai_101

      Hi, I need to display the 3 Lines of text in the alert Box in asp.net code behind but '\n' is does not work. My coding is as follows Page.RegisterClientScriptBlock("", "alert('Please Enter Date \n Please Enter Intime \n Please Enter Outtime')"); If any one know the solution Please send it immediately. Bye. :((

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Change \n to \\n. Therefore your code should be Page.RegisterClientScriptBlock("", "<script>alert('Please Enter Date \\n Please Enter Intime \\n Please Enter Outtime')</script>");

      J 1 Reply Last reply
      0
      • L Lost User

        Change \n to \\n. Therefore your code should be Page.RegisterClientScriptBlock("", "<script>alert('Please Enter Date \\n Please Enter Intime \\n Please Enter Outtime')</script>");

        J Offline
        J Offline
        jai_101
        wrote on last edited by
        #3

        Hi                   Thank You so much for Your Reply.                      It works well. Bye. :rose::rose::rose:

        Y 1 Reply Last reply
        0
        • J jai_101

          Hi                   Thank You so much for Your Reply.                      It works well. Bye. :rose::rose::rose:

          Y Offline
          Y Offline
          Yusuf
          wrote on last edited by
          #4

          Ramesh already answered your question

          jai_101 wrote:

          Page.RegisterClientScriptBlock("", alert('Please Enter Date \n Please Enter Intime \n Please Enter Outtime')");

          consider changing your message to Please Enter : Date, Intime and Outtime

          Yusuf May I help you?

          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