Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.††If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old February 22nd, 2005, 08:45 AM
Registered User
Join Date: Dec 2004
Location: London, , United Kingdom.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Returning to Parent page with refreshed New Data

Some desperate help please!

I have an individual with details of their company. I want reassign the individual to a different company which brings up a dialog box .I do a look up of the company with dialog box, if it's not there I create it. When clicking on the save button it creates this new company and should refresh the parent page with the new details. I have it all working up until I create the company, but do not know how to return to the parent page with the refreshed data.

I have a bit of script that could work but do not know how to implement it into the button_save function in C#.

  Dim mstrScript As String

   mstrScript = "<script>"

   mstrScript = mstrScript & "window.opener.document.forms(0).submit();"

   mstrScript = mstrScript & "window.close();"

   mstrScript = mstrScript & "</script>"

   Page.RegisterStartupScript("ClientScript", mstrScript)

This is what my button save function looks like at the moment:

public void ButtonSave_OnClick(Object sender, EventArgs e)


TblOrganisation sourceObject = new TblOrganisation();

AssignValues(ref sourceObject);

if (this.Page.IsValid

&& this.Page.ErrorBox.MessageCount == 0)


sourceObject.BlnDeleted = "N";

sourceObject.DteCreated = DateTime.Now;

sourceObject.StrCreatedBy = ThisPortal.CurrentUser.Name;


TblLog.WriteEvent(sourceObject.IntOrganisationID, MemeType.Organisation, "Organisation created", sourceObject.IntOrganisationID, MemeType.Organisation, sourceObject.StrOrganisationName);

this.Page.MessageBox.ShowMessage("Organisation has been created.");

this.Activator.ReferencedObjectIntID = sourceObject.IntOrganisationID;





this.Page.ErrorBox.ShowMessages(ThisSystem.Diction ary["Message.ErrorsFound"]);



Thanks in advance.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
when page refreshed layout breaks in IE7 socoolbrewster CSS Cascading Style Sheets 1 May 18th, 2008 12:05 AM
Page 85 - Returning Response Data as a String bnicholas BOOK: Beginning Ajax with ASP.NET 0 January 15th, 2007 03:59 PM
The page cannot be refreshed without sending ... toshi Javascript 2 September 26th, 2006 04:00 AM
Data is not refreshed after an insert TomTab ADO.NET 3 January 19th, 2006 12:24 AM
ASPX page not getting refreshed swanand VS.NET 2002/2003 1 September 15th, 2003 10:30 AM

All times are GMT -4. The time now is 09:55 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.