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. AutoPostBack for TreeView in ASP.Net 2

AutoPostBack for TreeView in ASP.Net 2

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettoolsquestion
4 Posts 2 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.
  • B Offline
    B Offline
    Bounz
    wrote on last edited by
    #1

    Hi! I can't find autoPostBack property for TreeView control at my asp script. But I still want ASP don't generate doPostBack script for TreeView. What have I to do for this?:confused: -- Digitally yours, Bounz

    M 1 Reply Last reply
    0
    • B Bounz

      Hi! I can't find autoPostBack property for TreeView control at my asp script. But I still want ASP don't generate doPostBack script for TreeView. What have I to do for this?:confused: -- Digitally yours, Bounz

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, The TreeView[^] control does not have the property. However, the control supports populating the node with the client side script without posting the page back, so IMHO you might want to use it. If it does not fit your demand, then could you tell why you need to this property?

      B 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, The TreeView[^] control does not have the property. However, the control supports populating the node with the client side script without posting the page back, so IMHO you might want to use it. If it does not fit your demand, then could you tell why you need to this property?

        B Offline
        B Offline
        Bounz
        wrote on last edited by
        #3

        So. Sometimes I have to fill my Tree with a lot of nodes and leaves. So I receive html with size about 1.5-2 Mb. It's too large. I looked at html-code and found out, that there is a lot of unnecessary code, related with doPostBack javascript. Can you tell me how can I use client side script to solve the problem? :-O -- Digitally yours, Bounz

        M 1 Reply Last reply
        0
        • B Bounz

          So. Sometimes I have to fill my Tree with a lot of nodes and leaves. So I receive html with size about 1.5-2 Mb. It's too large. I looked at html-code and found out, that there is a lot of unnecessary code, related with doPostBack javascript. Can you tell me how can I use client side script to solve the problem? :-O -- Digitally yours, Bounz

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          Bounz wrote:

          Can you tell me how can I use client side script to solve the problem?

          Do you mean you want to use client side script to get rid of unnecessary code like "doPostBack"? IMO, javascript cannot help you here because this unnecessary code is emitted in the Render method of the TreeNode class by default. In this case, you might want to customize the TreeView control so that when it renders, the Text of the TreeNode, not that whole script, is rendered in the RenderContents method of the TreeView.

          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