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. modalpopupextender with dynamic checkboxlist

modalpopupextender with dynamic checkboxlist

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

    I have a checkboxlist populated by a datasource having a textbox as a controlparameter. The checkboxlist is located within a modalpopup. When I click the button, the checkboxlist shows the list pertaining to the previous select. If I close and click the button to show the modalpopup, the second click shows the updated checkboxlist. I've tried everything I can think of and nothing seems to work. The latest attempt is to have a dummy button (arcArcPat) for the modalpopup. I click on btnPrePat to get the dynamic checkbox, but no modalpopup appears. Of course, when I click on btnArcPat, everything's great because I've clicked on the btnPrePat first. I tried taking away the display:none; and then I only get a flash on the screen, nothing that stays. Help?

    Protected Sub btnPrePat\_Click(sender As Object, e As EventArgs) Handles btnPrePat.Click 
        ds = New Data.DataSet 
        strSql = "SELECT TOP (100) PERCENT t.patID,  myType FROM blah, blah" 
        da = New Data.SqlClient.SqlDataAdapter(strSql, cn) 
        Try 
            da.Fill(ds, "patSearch1") 
            If ds.Tables("patSearch1").Rows.Count > 0 Then 
                cblPat.DataSource = ds.Tables("patSearch1") 
                cblPat.DataTextField = ds.Tables("pat").Columns("myType").ToString 
                cblPat.DataValueField = ds.Tables("pat").Columns("patID").ToString 
                cblPat.DataBind() 
            End If 
        Catch ex As Exception 
            Response.Write(ex.ToString) 
        End Try 
        mpePat.Show() 
    End Sub
    
    J 1 Reply Last reply
    0
    • J janetb99

      I have a checkboxlist populated by a datasource having a textbox as a controlparameter. The checkboxlist is located within a modalpopup. When I click the button, the checkboxlist shows the list pertaining to the previous select. If I close and click the button to show the modalpopup, the second click shows the updated checkboxlist. I've tried everything I can think of and nothing seems to work. The latest attempt is to have a dummy button (arcArcPat) for the modalpopup. I click on btnPrePat to get the dynamic checkbox, but no modalpopup appears. Of course, when I click on btnArcPat, everything's great because I've clicked on the btnPrePat first. I tried taking away the display:none; and then I only get a flash on the screen, nothing that stays. Help?

      Protected Sub btnPrePat\_Click(sender As Object, e As EventArgs) Handles btnPrePat.Click 
          ds = New Data.DataSet 
          strSql = "SELECT TOP (100) PERCENT t.patID,  myType FROM blah, blah" 
          da = New Data.SqlClient.SqlDataAdapter(strSql, cn) 
          Try 
              da.Fill(ds, "patSearch1") 
              If ds.Tables("patSearch1").Rows.Count > 0 Then 
                  cblPat.DataSource = ds.Tables("patSearch1") 
                  cblPat.DataTextField = ds.Tables("pat").Columns("myType").ToString 
                  cblPat.DataValueField = ds.Tables("pat").Columns("patID").ToString 
                  cblPat.DataBind() 
              End If 
          Catch ex As Exception 
              Response.Write(ex.ToString) 
          End Try 
          mpePat.Show() 
      End Sub
      
      J Offline
      J Offline
      janetb99
      wrote on last edited by
      #2

      For anyone else, - just wanted you to know that I figured out the bigger problem. Something must have corrupted the ajaxcontroltoolkit installation just enough. Once I re-referenced it, everything started working fine. Sorry for the trouble and thanks for your help.

      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