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. Problem passing data between modal dialog and parent window

Problem passing data between modal dialog and parent window

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-net
4 Posts 3 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.
  • U Offline
    U Offline
    User 822623
    wrote on last edited by
    #1

    Hi! I'm really having trouble sending data from a modal dialog window to a parent window in asp.net I have a parent page with several textboxes and each textbox has a button that opens a lookup child window (modal dialog) when clicked. The lookup pages have filtered datagrid data, that when are selected should be passed back to the parent page. My problems are: 1- my modal dialog has a couple of dependent dropdownlists to filter the datagrid information. Everytime I select an option from the first dropdownlist, the page is reloaded and it opens in a new window normal window. And I still have the modal dialog open. I want to use the modal dialog, not the new opened window. 2 - I have already been able to send data from the dialog to the parent page with querystrings, but I would prefer not to use this method, besides, like I've described above, I have to open several lookup pages, and each time I open another one, I loose the data passed from the previous, because the window location (URL) becomes diferent due to the new querystring and the page loads again and all the controls loose their info. Please help me... send a post Best regards Mario Ramos

    M 1 Reply Last reply
    0
    • U User 822623

      Hi! I'm really having trouble sending data from a modal dialog window to a parent window in asp.net I have a parent page with several textboxes and each textbox has a button that opens a lookup child window (modal dialog) when clicked. The lookup pages have filtered datagrid data, that when are selected should be passed back to the parent page. My problems are: 1- my modal dialog has a couple of dependent dropdownlists to filter the datagrid information. Everytime I select an option from the first dropdownlist, the page is reloaded and it opens in a new window normal window. And I still have the modal dialog open. I want to use the modal dialog, not the new opened window. 2 - I have already been able to send data from the dialog to the parent page with querystrings, but I would prefer not to use this method, besides, like I've described above, I have to open several lookup pages, and each time I open another one, I loose the data passed from the previous, because the window location (URL) becomes diferent due to the new querystring and the page loads again and all the controls loose their info. Please help me... send a post Best regards Mario Ramos

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

      The question is appear here that how do you have modal dialog window in ASP.NET? :omg: Mazy No sig. available now.

      U 1 Reply Last reply
      0
      • M Mazdak

        The question is appear here that how do you have modal dialog window in ASP.NET? :omg: Mazy No sig. available now.

        U Offline
        U Offline
        User 822623
        wrote on last edited by
        #3

        Hi Mazy I have a javascript function as follows: #javascript code function MostraEq() { strReturn=window.showModalDialo('procura_equipamento.aspx',null,'status:yes;dialogWidth:350px;dialogHeight:350px;dialogHide:true;help:no;scroll:auto;center:yes;resizable:no'); } #end javascript code and then in codebehind in Page_Load I add an attribute to the button as follows: #asp.net code btnProcuraEquipamento.Attributes.Add("onclick", "MostraEq();") #end asp.net code That part was easy....

        M 1 Reply Last reply
        0
        • U User 822623

          Hi Mazy I have a javascript function as follows: #javascript code function MostraEq() { strReturn=window.showModalDialo('procura_equipamento.aspx',null,'status:yes;dialogWidth:350px;dialogHeight:350px;dialogHide:true;help:no;scroll:auto;center:yes;resizable:no'); } #end javascript code and then in codebehind in Page_Load I add an attribute to the button as follows: #asp.net code btnProcuraEquipamento.Attributes.Add("onclick", "MostraEq();") #end asp.net code That part was easy....

          M Offline
          M Offline
          Michela 0
          wrote on last edited by
          #4

          Look at this, perhaps it helps you http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconpassingservercontrolvaluesbetweenpages.asp Michela

          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