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. about javascript function

about javascript function

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nethelpquestion
5 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.
  • S Offline
    S Offline
    Seraph_summer
    wrote on last edited by
    #1

    I found that some javascript functions are requied to register first by using RegisterStartupScript in order to be used in ASP.net, however, some functions are not required for registration. anyone can help me clarify what kind of javascript funcitons have to be registered?

    A A 2 Replies Last reply
    0
    • S Seraph_summer

      I found that some javascript functions are requied to register first by using RegisterStartupScript in order to be used in ASP.net, however, some functions are not required for registration. anyone can help me clarify what kind of javascript funcitons have to be registered?

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

      Use RegisterStartupScript method to register the client script which needs to placed at the bottom of page. If you have events of controls are tied to client side scripts, then this could be useful. As the control will not be availble at the page strtup, it's good to register them at the bottom. Let me know if this helps you.:)

      Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

      S 1 Reply Last reply
      0
      • A Arindam Sinha

        Use RegisterStartupScript method to register the client script which needs to placed at the bottom of page. If you have events of controls are tied to client side scripts, then this could be useful. As the control will not be availble at the page strtup, it's good to register them at the bottom. Let me know if this helps you.:)

        Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

        S Offline
        S Offline
        Seraph_summer
        wrote on last edited by
        #3

        thanks, what do you mean the "bottom"?

        A 1 Reply Last reply
        0
        • S Seraph_summer

          thanks, what do you mean the "bottom"?

          A Offline
          A Offline
          Arindam Sinha
          wrote on last edited by
          #4

          Bottom means the lower section of the page. Write some page, execute in borwser (e.g. IE) and try to check the view source.

          Regards, Arindam Sinha MyBlog - http://arindamsinha.wordpress.com/ Please give your feedback on this answer.

          1 Reply Last reply
          0
          • S Seraph_summer

            I found that some javascript functions are requied to register first by using RegisterStartupScript in order to be used in ASP.net, however, some functions are not required for registration. anyone can help me clarify what kind of javascript funcitons have to be registered?

            A Offline
            A Offline
            Abhishek Sur
            wrote on last edited by
            #5

            Generally, before calling any javascript function, you need to add the source to the head element of the page using script tag. RegisterStartupScript just does this. It adds the script src to the page so that you can call it later. Generally, Startup scripts which are added by ScriptManager is not required to be registered by yourself. As ASP.NET controls adds up those for you. But if you need some custom script to be added to your page, you can use this function. :rose:

            Abhishek Sur


            My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

            **Don't forget to click "Good Answer" if you like to.

            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