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. OutputCache a WebControl

OutputCache a WebControl

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

    Dear CPians, I is there a way to use OutputCache in WebControls? It is very easy to use it in UserControls, But what happens with WebControls? Am I missing something important? Thanking you in advance.

    Jason Kataropoulos

    Excellence is not an act, but a habit!

    Aristotle

    M 1 Reply Last reply
    0
    • T theJazzyBrain

      Dear CPians, I is there a way to use OutputCache in WebControls? It is very easy to use it in UserControls, But what happens with WebControls? Am I missing something important? Thanking you in advance.

      Jason Kataropoulos

      Excellence is not an act, but a habit!

      Aristotle

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

      Basically, you can only use the OutputCache directive with a content element like the web page or web user control, and at runtime the ASP.NET parser will process this directive to decide if it should initialize the element from scratch or simply get the output markup from cache. For the custom control, you cannot apply this directive and if you want to support caching for custom controls, you'll need to think of other solutions. For example, you simply use a web user control as a container for your webcontrol.

      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