Opening a popup window for data entry in .NET

I have a page with labels, dropdown lists, and buttons, which needs to be always visible in the browser. When the user clicks a 'modify' button on this page, a web form with text boxes will open up in the form of a new popup window, so that changes can be made and submitted from this smaller popup window. Ideally, the main page should be re-loaded in the original browser window reflecting the latest udpates after the popup window is closed.
I am passing variables to the popup and the code below doesn't quite behave as I wanted it to.
As it is right now, I'm calling the appDetailEdit,aspx twice, but I don't know enough to write an inline javascript statement so that it opens up a popup window, passes the values I need to it, while keeping the main page in the original browser window, which will reload automatically when the form in the popup window is submitted.
Thank you.

Sub bClick1( s As Object, e As EventArgs )
Context.Items.Add( "Application_ID", lblAppID.Text )
Context.Items.Add( "Name", lblName.Text )
Context.Items.Add( "Acronym", lblAcronym.Text )
Context.Items.Add( "Program_Area_Name", lblProgArea.Text )
Context.Items.Add( "Usage_start_Date", lblStartDate.Text )
Context.Items.Add( "Description", lblDesc.Text )
Context.Items.Add( "Field_Detail", lblFieldDet.Text )
Context.Items.Add( "DivisionName", lblDivisionID.Text )
d( "BureauName", lblBureauID.Text )
Response.write("<script language='JavaScript'>'appDetailEdit.aspx','PopUp','location=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes')<" & "/script>")
server.transfer( "appDetailEdit.aspx", true )
End Sub

- a c -


"still desperately seeking for alternatives"
5/5/2004 5:56:38 PM 24353 articles. 2 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 12
Get it on Google Play
Get it on Apple App Store

You have two choices for passing information to the popup via client-side code (thus negating the necessity of the PostBack):

1. Use querystring parameters - 'appDetailEdit.aspx' becomes 'appDetailEdit.aspx?AppID=1&Name=Bubba...' - if you need the data before the page loads.
2. Use a callback method in the popup - Popup window has 'window.opener.GetEditInfo();' - if you're edit existing data that has already been rendered to the parent page
Then you're popup can do its own PostBack to save the changes and refresh its parent...
5/6/2004 3:24:17 AM
Thank you for replying.

Your option 2 is the one that best applies to my case as I don't really need the data before the page loads (at this point in time, anyway)
Can you suggest a place or link to some relevant examples?? I've been reading from several places but not quite applicable to my problem.
Thanx again,

- a c -


"still desperately seeking for alternatives"
5/6/2004 2:33:49 PM

<Parent Page Javascript>
function dataObj(appID, name, description)
this.ApplicationID = appID;
this.Name = name;
this.Description = description;
function passData()
return new dataObj(selectedAppID, selectedName, selectedDescription);
<Popup Page Javascript>
function Page_Init()
var theData = window.opener.passData();
document.all["appIDTextBoxClientID"].value = theData.ApplicationID;
document.all["nameTextBoxClientID"].value = theData.Name;
document.all["descriptionTextboxClientID"].value = theData.Description;

Just a rough example. You'll have to fill in some of the blanks.
5/7/2004 2:12:00 AM

Similar Artilces:

open a popup window code behind
Hi I am trying to open a new window from a button in my aspx side. This works, but I have to push the button 2 times before it open. Any idea? Public Shared Sub OpenPopUp(ByVal opener As System.Web.UI.WebControls.WebControl, ByVal PagePath As String) Dim clientScript As String 'Building the client script- clientScript = "'" & PagePath & "')" 'register the script to the clientside click event of the opener control opener.Attributes.Add("onClick", clientScript) End Sub Sub Button1_Click(sender As...

------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

how to get value from client side script Prompt window to a session var in .net
hi guyz, i hav a problem with getting a value from a client-side inputbox to a session var in .net. is this possible? however, when i click submit button this is the code that's triggered. dim sb as New System.Text.StringBuilder sb.append("<script language=" & """" & "vbscript" & """" & ">") sb.append(vbcrlf) sb.append(vbcrlf) sb.append("do while xLate =" & """" & """") sb.append(vbcrlf) '//prompt window, val...

Side by Side Execution of .net v1.1 and .net v2.0
Hi i am new bie to 2.0.Till date i have been developing projects using VS.Net 1.1 and now i hv decided to upgrade to new version 2.0.Now i want to run and develop my projects using any of the versions as desired.My question is that can i install vs 2.0 without updating the previous version and will i be able to develop and run my applications in any of the versions as desired.i have been known that we can run these versions side by side(i.e. one application can use 1.1 and other 2.0),but can we do side by side development as well(i.e. one application can use 1.1...

DataWindow .NET for Windows CE .NET
It is possible to use DataWindow .NET for Windows CE .NET? When I create a Smart Device Application project for Visual C#, I can't see the Datawindow .NET controls (DW control, Datastore,...). ...

Side by Side Execution of .net v1.1 and .net v2.0 (continued)
Hi, Dave wrote a previous post that said: "If you are referring to web applications - each Virtual server must specify the framework to run under.  Both can run side-by-side.. but not under the same virtual server (application pool)" That looks fine, but I wonder: Is it just as easy as going to Administrative Tools --> IIS --> Select the virtual directory --> go to the property's ASP.NET tab and then selecting the ASP.NET version? Is there some important information that I need to know before going into this? Are there going to be ANY issues I should be aware of? T...

Validation Controls in .NET ( Client side or server side?)
 i have a very basic question. We have all these validation controls in ( required field, range validator and others) question is the required field validator is a server side control. So does that mean that it does a post back? it client side or server side control  The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox.  Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event. All controls are considered clien...

Jscript, moving from client-side to server-side (.NET)
Hey all I’m working translating a web-app written in client-side Jscript to run on the server-side as JScript.NET. Without needing to get too specific, I am using Jscript because the original page aggregated raw data to produce statistical results (this was done dynamically based on user 'sort-by' options). The final output is an html report that can be emailed. Because this is currently being done on the client side, as the raw data grows the load-time grows as well (to the point that has almost become unusable). I’m posting here to see if anyone has any experi...

.NET for client side?
Is this the idea of "Atlas" but using JavaScript rather than another technology? Atlas's goal is to abstract various browser implementations of DOM API and to ease out the developer's job to write rich client applications. Atlas hence makes use of the existing all-browser supported JavaScript to achieve this. Thanks for your reply.Let me convey my idea differently: I would like to author client side code using a class system. I recognise that Atlas is a technology for producing JS code, much in the same way that ASP.NET produces HTML for the browser.Will Atlas be m...

.NET 2.0 Data Connection (.NET 2.0 Beta Data Provider)
I have installed the .NET 2.0 Beta Data Provider, in the server explorer in Visual Studio 2005 I have tried to connect to this provider but I can not see it in the list. Is there something else you need to do to see this other than what is in the instructions or is this not supported yet? Hi Dean, I assume you mean ASE ADO.NET 2.0 Beta. I'm attaching the html readme for this product that you should have from downloading it. Are you talking about using Server Explorer to see the Provider? This functionality isn't working yet and should be available on GA or shortly ...

superreview granted: [Bug 263844] Javascript window.close() on popup not working when popup is opened in tab : [Attachment 162257] set opener on opened windows diverted into tabs
Boris Zbarsky <> has granted Boris Zbarsky <>'s request for superreview: Bug 263844: Javascript window.close() on popup not working when popup is opened in tab Attachment 162257: set opener on opened windows diverted into tabs ------- Additional Comments from Boris Zbarsky <> r+sr=bzbarsky. Dan, thanks for doing this! I really wish we could factor some of this code that's being copied f...

When to use client side varidation and server side varidation in .net?
In .net or classic web application we can varidate user data either on client isde or server side. How to select which side varidate to be used? Thanks! Generally, I use both client and server validation. I make sure the input is in the correct format and reasonably valid on the client, then I verify the data on the server. The extent of validation also depends on the type of data that I need to validate.Here are a few references:Validating ASP.NET Server ControlsIntroduction to Validating User Input in Web FormsClient-Side Validation for ASP.NET Server ControlsSecurity Checklist...

Open Popup Window and Close the window that Opened it
I'm using some code that I found on this site to open a Popup window with a Button Click for a Crystal Report: Dim PopUpScript As String = "<script language='javascript'>" + "" & Chr(39) & strExportFile & Chr(39) & ");</script>" Page.ClientScript.RegisterStartupScript(Me.GetType(), "PopUpWindow", PopUpScript, False) After the Popup Window shows the Report I would like to close the window that opened this popup window.  Thanks, Mark just add window.close(); in Dim PopUpScript As String ...

I am not getting my mail open on my net as net is running
Name: Email: rmbala91atgmaildotcom Product: Firefox Summary: I am not getting my mail open on my net as net is running Comments: My mail is not getting opening. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100401 Firefox/3.6.3 From URL: Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

Web resources about - Opening a popup window for data entry in .NET -

Encyclopaedia of Chess Openings - Wikipedia, the free encyclopedia
The Encyclopaedia of Chess Openings (or ECO ) is a classification system for the opening moves in a game of chess . It is presented as a five-volume ...

INFOGRAPHIC: Major League Baseball Facebook Standings At Opening Of 2013 Season
The New York Yankees may be injury-plagued and off to a sluggish start to the 2013 Major League Baseball season, but when it comes to Facebook ...

Into Film Festival opening Q&A
Today I met Malala. She was giving, utterly graceful, compelling and intelligent. That might sound obvious but I was struck by this even more ...

Cisco is opening a new office for 300 staff near London's trendiest roundabout
Business Insider Australia Cisco is opening a new office for 300 staff near London's trendiest roundabout Business Insider Australia Cisco ...

Perth pub, nightclub opening hours to extend - Sunday Sessions, WA
AS THE east coast of Australia cracks down on late-night drinking, Western Australia is heading in the opposite direction.

Liveblogging World War II: Robert H. Jackson: Opening Statement before the International Military Tribunal ...
**Robert H. Jackson**: [Opening Statement before the International Military Tribunal]( ...

Cheap Girls, Worriers, Petal, Aaron West, Dan Andriano and more opening Bayside's holiday tour
photo: Worriers at Baby's in August (more by Amanda Hatfield) Bayside are going on a short holiday tour of the Northeast in December and the ...

Opening Bell, November 18 - Business Insider Deutschland
A huge police raid in Paris overnight, and all the big finance news of Wednesday morning.

Cisco is opening a new office for 300 staff near London's trendiest roundabout
Cisco is opening a new office for 300 staff near London's trendiest roundabout Business Insider Cisco announced today that it has opened a ...

Square spikes 50% after opening at $11.20 a share
The mobile payments company began its trading debut at $11.20 a share on Thursday, after pricing at $9 a day earlier.

Resources last updated: 11/24/2015 5:57:04 AM