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. alert(<%= DateTime.Now.ToString() %&gt'); in my embed resource javascript

alert(<%= DateTime.Now.ToString() %&gt'); in my embed resource javascript

Scheduled Pinned Locked Moved ASP.NET
helpjavascriptlearning
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.
  • G Offline
    G Offline
    god4k
    wrote on last edited by
    #1

    Dear Sir and Madam I have an embed resource javascript in my Web Control Library. The javascript has function below function test() { alert('<%= DateTime.Now.ToString() %>'); } The problem is the function alert incorrect result. Please help me. Thank You.

    A K A M 4 Replies Last reply
    0
    • G god4k

      Dear Sir and Madam I have an embed resource javascript in my Web Control Library. The javascript has function below function test() { alert('<%= DateTime.Now.ToString() %>'); } The problem is the function alert incorrect result. Please help me. Thank You.

      A Offline
      A Offline
      Adam Maras
      wrote on last edited by
      #2

      god4k wrote:

      The problem is the function alert incorrect result.

      What is the incorrect result shown by the alert?

      1 Reply Last reply
      0
      • G god4k

        Dear Sir and Madam I have an embed resource javascript in my Web Control Library. The javascript has function below function test() { alert('<%= DateTime.Now.ToString() %>'); } The problem is the function alert incorrect result. Please help me. Thank You.

        K Offline
        K Offline
        Kannan Ar
        wrote on last edited by
        #3

        In this case the alert box will show the server time. Do you expect time on client machine?

        1 Reply Last reply
        0
        • G god4k

          Dear Sir and Madam I have an embed resource javascript in my Web Control Library. The javascript has function below function test() { alert('<%= DateTime.Now.ToString() %>'); } The problem is the function alert incorrect result. Please help me. Thank You.

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          god4k wrote:

          alert('<%= DateTime.Now.ToString() %>');

          god4k wrote:

          The problem is the function alert incorrect result.

          What is the actaul error?

          cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

          1 Reply Last reply
          0
          • G god4k

            Dear Sir and Madam I have an embed resource javascript in my Web Control Library. The javascript has function below function test() { alert('<%= DateTime.Now.ToString() %>'); } The problem is the function alert incorrect result. Please help me. Thank You.

            M Offline
            M Offline
            Manas Bhardwaj
            wrote on last edited by
            #5

            god4k wrote:

            The problem is the function alert incorrect result

            If you want to get the time on client machine, use the date object [^]of Javascript.

            Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

            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