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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. JavaScript

JavaScript

Scheduled Pinned Locked Moved ASP.NET
questionjavascripttutorial
3 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.
  • R Offline
    R Offline
    Rahul Babu
    wrote on last edited by
    #1

    Hi Friends, I have to call a javascript from my cs page. It should be called exactly when the page loads. How can I do it ? I know how to call that on a button click but how can I call the javascript on page load event? thank you

    A S 2 Replies Last reply
    0
    • R Rahul Babu

      Hi Friends, I have to call a javascript from my cs page. It should be called exactly when the page loads. How can I do it ? I know how to call that on a button click but how can I call the javascript on page load event? thank you

      A Offline
      A Offline
      Abolfazl Sheikhloo
      wrote on last edited by
      #2

      u have olready have a javascript function in page for example: function Sample() { alert("test"); } now u can use this code in page load: this.Controls.Add(new LiteralControl("func1();")); We Can Do Anything, If We Want It

      1 Reply Last reply
      0
      • R Rahul Babu

        Hi Friends, I have to call a javascript from my cs page. It should be called exactly when the page loads. How can I do it ? I know how to call that on a button click but how can I call the javascript on page load event? thank you

        S Offline
        S Offline
        saini arun
        wrote on last edited by
        #3

        use the following script on page load event of your page.... Page.RegisterStartupScript("MyDemo", "alert('hi there');");

        “The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”

        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