inserting record through pop window question and then forcing refresh

Discussion in 'ASP .Net' started by Patrick Olurotimi Ige, May 31, 2005.

  1. I have a webform with DropDownLists and
    and i would like to have a link that would open up a window popup for
    the USER to
    insert some data into the Database and then on closing the popub window
    or clicking the save button i would like to force the main page to
    refresh so that the Data would show in the Dropdwon list i want to
    insert the Data to
    Any ideas?

    *** Sent via Developersdex http://www.developersdex.com ***
    Patrick Olurotimi Ige, May 31, 2005
    #1
    1. Advertising

  2. RE: inserting record through pop window question and then forcing refr

    Hi Pat
    Here is the Code which does that.
    Assuming that you have completed the code for loading the data into the
    DropDownList.
    In the PopupWindow here is the algorithm to follow
    if (isPostBack)
    {
    <Your Asp.Net code to insert the Record>
    Response.Write "<script>window.opener.location.href='<aspxpage>';</script>");
    Response.Write ("<script>window.close();</script>");
    }
    From the above code current window will be closed and the parent page will
    be refreshed and teh data will be loaded into the dropdown list.
    I have complete set of code for reference. But I hope the above example does
    the thing for you.

    Thanks
    --
    Srinivas Nadella
    SSE - Satyam Computer Services
    Hyderabad
    India


    "Patrick Olurotimi Ige" wrote:

    > I have a webform with DropDownLists and
    > and i would like to have a link that would open up a window popup for
    > the USER to
    > insert some data into the Database and then on closing the popub window
    > or clicking the save button i would like to force the main page to
    > refresh so that the Data would show in the Dropdwon list i want to
    > insert the Data to
    > Any ideas?
    >
    > *** Sent via Developersdex http://www.developersdex
    =?Utf-8?B?U3Jpbml2YXMgTmFkZWxsYQ==?=, May 31, 2005
    #2
    1. Advertising

  3. Patrick Olurotimi Ige

    Prodip Saha Guest

    Patrick- Looks like you will need to implement some javascripts. Have a look at this article on how to work with modal pop up windows- http://www.codeproject.com/aspnet/Modal_Dialog.asp?print=true

    You can modify the scripts in the parent window to refresh after returning from child window.

    Thanks,
    Prodip
    www.aspnet4you.com

    "Patrick Olurotimi Ige" <> wrote in message news:...
    I have a webform with DropDownLists and
    and i would like to have a link that would open up a window popup for
    the USER to
    insert some data into the Database and then on closing the popub window
    or clicking the save button i would like to force the main page to
    refresh so that the Data would show in the Dropdwon list i want to
    insert the Data to
    Any ideas?

    *** Sent via Developersdex http://www.developersdex.com ***
    Prodip Saha, May 31, 2005
    #3
  4. Patrick Olurotimi Ige, Jun 2, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    8,505
    Randy Webb
    Feb 4, 2006
  2. Pkenty
    Replies:
    0
    Views:
    381
    Pkenty
    May 28, 2004
  3. J P Singh
    Replies:
    3
    Views:
    291
    Howard Rothenburg
    Feb 11, 2004
  4. Replies:
    0
    Views:
    261
  5. Replies:
    2
    Views:
    133
    Randy Webb
    Feb 4, 2006
Loading...

Share This Page