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. Asp.net 2.0: ListControl Vs WebControl when (Page.IsCallback == True)

Asp.net 2.0: ListControl Vs WebControl when (Page.IsCallback == True)

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-netvisual-studiosysadmin
1 Posts 1 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.
  • K Offline
    K Offline
    kadaoui el mehdi
    wrote on last edited by
    #1

    Hi, In Asp.net 2.0 : - you can catch asynch Event on implementing ICallBackEvent Handler. - the Event LoadViewState is raised after a POSTPACK So if you create 2 Custom web controls ( "WC1" and "WC2"): -WC1: inherits from "WebControl" and implements " ICallBackEvent Handler" -WC2: inherits from "ListControl" and implements " ICallBackEvent Handler" -override the LoadViewstate in the 2 controls and put a breakpoints. On the click event of WC1, you call a Javascript Method that send a Callback to the Server exemple:

    <wc1:Webcontrol1 Id="Webcontrol1" onclick="javascript:_doCallback(..)" ..>

    Normally When you click on WC1, the LoadViewState event will be not raised because is not a POSTBACK event, BUT strangelly in the WC2 the LoadViewState method is raised! So the conclusion is, All controls that inherits from "ListControl" raise the LoadViewState method evenif there is no postback! WHY ?

    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