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. Custom Control post back raises Validation Control's Validate event

Custom Control post back raises Validation Control's Validate event

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

    Hi all, I have developed a custom pager control, which has been inherited from WebControl, IPostBackDataHandler. Function of the control is to render a pager layout ( page numbers, next, prev, buttons ) and raise an event on the server when page change in UI. Problem is what when i place any validator control which are validate on server only are raising validation on custom pager control's post back. code preview

    PreRender(){
       // Registering client script block that set page index in hidden
       // and submit the form
    }
    
    Render(){
       // Rendering set of links (  ) that will call my javascript function
       // to set page index in hidden and post back the page
    }
    
    LoadPostData(){
       // Check hidden variable and return true to raise event
    }
    
    RaisePostDataChangedEvent(){
       // Raising PageIndexChanged event
    }
    

    if anybody has resolution of this problem, please guide me, i will be very thankful to all of you.


    Confidence comes not from always being right, but from not fearing to be wrong. Mihir..

    M 1 Reply Last reply
    0
    • M MihirV

      Hi all, I have developed a custom pager control, which has been inherited from WebControl, IPostBackDataHandler. Function of the control is to render a pager layout ( page numbers, next, prev, buttons ) and raise an event on the server when page change in UI. Problem is what when i place any validator control which are validate on server only are raising validation on custom pager control's post back. code preview

      PreRender(){
         // Registering client script block that set page index in hidden
         // and submit the form
      }
      
      Render(){
         // Rendering set of links (  ) that will call my javascript function
         // to set page index in hidden and post back the page
      }
      
      LoadPostData(){
         // Check hidden variable and return true to raise event
      }
      
      RaisePostDataChangedEvent(){
         // Raising PageIndexChanged event
      }
      

      if anybody has resolution of this problem, please guide me, i will be very thankful to all of you.


      Confidence comes not from always being right, but from not fearing to be wrong. Mihir..

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

      Do you mean when your custom pager control is working, it causes the validators on the web page to work at the server side? If so, you can try to make your control implement the IPostBackEventHandler inferface, and simply leave the implementation of the RaisePostBackEvent method empty.

      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