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 make asp.net control attribute update from javascript persistent?

How to make asp.net control attribute update from javascript persistent?

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

    Hi, I have a control where I calculate the height property from javascript and set that accordingly. My problem is that the control is embedded in a updatepanel which updates every second. On updating, the default height value of the control is used. How do I make the height value calculated from javascript persistent so that asp.net uses it on postback. Thanks Mike

    Y A 2 Replies Last reply
    0
    • H hardboy111

      Hi, I have a control where I calculate the height property from javascript and set that accordingly. My problem is that the control is embedded in a updatepanel which updates every second. On updating, the default height value of the control is used. How do I make the height value calculated from javascript persistent so that asp.net uses it on postback. Thanks Mike

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

      There are several ways you can handle this. Let me give you two sets 1. When you calculate the height of control, hold to the value in hidden field. Then on post back after you done what ever you need to do, set the control height based on the hidden field value. This will always match to your last calculation. 2. You can use Sys.WebForms.EndRequestEventArgs. This event will get fired at the end of updatepanel successful update. There you can set the control size. see here[^]

      Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

      1 Reply Last reply
      0
      • H hardboy111

        Hi, I have a control where I calculate the height property from javascript and set that accordingly. My problem is that the control is embedded in a updatepanel which updates every second. On updating, the default height value of the control is used. How do I make the height value calculated from javascript persistent so that asp.net uses it on postback. Thanks Mike

        A Offline
        A Offline
        Alok Sharma ji
        wrote on last edited by
        #3

        just simple n easy make your height expression static. bye

        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