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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. SelectedIndexChange of a checkedListbox

SelectedIndexChange of a checkedListbox

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

    Hi, I want to handle the selectedindexchanged event of a checkedListbox in the client side using javascript. I was initially handling it in the server side but it goes to page load so want to handle it in the client side. How to do it? Below is my server side code for handling it: Private Sub cbxEmpResponse_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxEmpResponse.SelectedIndexChanged Dim ii As Integer Dim iflag As Integer = 0 Dim ijflag As Integer = 0 If cbxSelectAll.Checked = True Then For ii = 0 To cbxEmpResponse.Items.Count - 1 If cbxEmpResponse.Items(ii).Selected = False Then iflag = 1 End If Next End If If iflag = 1 Then cbxSelectAll.Checked = False End If If cbxSelectAll.Checked = False Then For ii = 0 To cbxEmpResponse.Items.Count - 1 If cbxEmpResponse.Items(ii).Selected = False Then ijflag = 1 End If Next End If If ijflag = 0 Then cbxSelectAll.Checked = True End If End Sub Want to convert it in the client side code. Plz help Thanks, Riz Riz

    V 1 Reply Last reply
    0
    • R Rajiya

      Hi, I want to handle the selectedindexchanged event of a checkedListbox in the client side using javascript. I was initially handling it in the server side but it goes to page load so want to handle it in the client side. How to do it? Below is my server side code for handling it: Private Sub cbxEmpResponse_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxEmpResponse.SelectedIndexChanged Dim ii As Integer Dim iflag As Integer = 0 Dim ijflag As Integer = 0 If cbxSelectAll.Checked = True Then For ii = 0 To cbxEmpResponse.Items.Count - 1 If cbxEmpResponse.Items(ii).Selected = False Then iflag = 1 End If Next End If If iflag = 1 Then cbxSelectAll.Checked = False End If If cbxSelectAll.Checked = False Then For ii = 0 To cbxEmpResponse.Items.Count - 1 If cbxEmpResponse.Items(ii).Selected = False Then ijflag = 1 End If Next End If If ijflag = 0 Then cbxSelectAll.Checked = True End If End Sub Want to convert it in the client side code. Plz help Thanks, Riz Riz

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      Use Microsoft AJAX 1.0. You can use the same server-side itself.

      Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group | Blog Spot

      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