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. How to use button control inside ModalPopup Ajax Control

How to use button control inside ModalPopup Ajax Control

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

    Hi all, I am building one application where i want to do folowing 1) Open popup on button click 2) Pop up contains name textbox and search button and datagrid. 3) user type name in textbox and search result will comre in datagrid I used modal popup ajax control (AnimationExtender) New pop is properly loding with all controls but when i clicked on search button popup window automaticaly close. I am not getting how to handel this? so plz help me if anyone knows soln....

    V 1 Reply Last reply
    0
    • G girishdonde

      Hi all, I am building one application where i want to do folowing 1) Open popup on button click 2) Pop up contains name textbox and search button and datagrid. 3) user type name in textbox and search result will comre in datagrid I used modal popup ajax control (AnimationExtender) New pop is properly loding with all controls but when i clicked on search button popup window automaticaly close. I am not getting how to handel this? so plz help me if anyone knows soln....

      V Offline
      V Offline
      Vinay Dornala
      wrote on last edited by
      #2

      Hi, You can put two button(Search N Close) one for search and another for closing popup use UpdatePanel put both buttons in this and call .Hide() method of ModelPopup in code behind on button click event. see the sample impl. .aspx coding TargetControlID="hiddenTargetControlForModalPopup" PopupControlID="programmaticPopup" BackgroundCssClass="modalBackground" DropShadow="false" PopupDragHandleControlID="programmaticPopupDragHandle" RepositionMode="RepositionOnWindowScroll"> Implement your logic for populating Gridview with appropriate search results in Search Button click event in code behind.. Protected Sub btnClose_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnClose.Click Try Me.programmaticModalPopup.Hide() Catch ex As Exception throw ex End Try End Sub Protected Sub btnOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOk.Click Try // implement logic to populate gridview with resultset. // If you want to execute any logic when click on button that opens popup // you put button ouside the updatepanel. Catch ex As Exception throw End Try End Sub Check lines which are in bold format. I hope this will solve your problem. if you get any problem in populating GridView then pls delete search button from updatepanel. You can refer Ajaxtoolkit sample impl video for all ajaxtoolkit controls.

      modified on Wednesday, May 28, 2008 10:21 AM

      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