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 download embedded resources of webcontrol on AJAX call?

How to download embedded resources of webcontrol on AJAX call?

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

    Hi, I developed a custom webcontrol in which all resources (like images, javascript etc) are embedded. Since everything is embedded only single DLL is deliverable. In the consumer page, its object is instantiated. Related html and resources gets rendered in the page response. Obviously the response gets heavier based on size of resources (plus lot of other toolkit generated files) Now, this is a modalpopup feature which is not used daily so we want to make it on demand. Which means that we don't want to instantiate control's object every time the page renders. But will provide a link of page which user can click-on to view the feature in a modal popup. At the click, an AJAX call will be made and will pull the necessary information and html to be displayed. The problem is how to download the embedded resources of webcontrol on AJAX call? It will also need the toolkit generated files too. Any ideas will be appreciated? Thanks Pankaj

    J 1 Reply Last reply
    0
    • P pankazmittal

      Hi, I developed a custom webcontrol in which all resources (like images, javascript etc) are embedded. Since everything is embedded only single DLL is deliverable. In the consumer page, its object is instantiated. Related html and resources gets rendered in the page response. Obviously the response gets heavier based on size of resources (plus lot of other toolkit generated files) Now, this is a modalpopup feature which is not used daily so we want to make it on demand. Which means that we don't want to instantiate control's object every time the page renders. But will provide a link of page which user can click-on to view the feature in a modal popup. At the click, an AJAX call will be made and will pull the necessary information and html to be displayed. The problem is how to download the embedded resources of webcontrol on AJAX call? It will also need the toolkit generated files too. Any ideas will be appreciated? Thanks Pankaj

      J Offline
      J Offline
      Jesse Squire
      wrote on last edited by
      #2

      Microsoft has provided an HTTP Handler in ASP.NET 2.0 and greater that performs this task for you. It goes by the name of webresource.axd. Google[^] has plenty of examples on its use. Hope that helps. :)

      --Jesse

      "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

      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