473,805 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving fields from popup page

Hi All,

I have a main page from which I am calling a popup page. Thepopup page has an editable grid and some other fields. There isalso a Save button on the popup page. When the user clicks theSave button on the popup page, I want to save the values in thedatagrid as a dataset into the ViewState of the main page. Can Iaccess the ViewState of the main page in the popup page? If not,what is the way out?

Thanks,
Sanjeev

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>aWgslaBQnku IZNKxza7RSg==</Id>
Nov 18 '05 #1
1 1540
Hi Sanjeev,

If you launch your popup as a modal window you can set the
window.resultVa lue to a comma delimited (or other delimiter) string. Then
you will have the data in your main page, set that data to a hidden input
field that has the runat="server" tag set. Then when your main page does a
postback, parse this hidden field and add the values to your dataset. I
don't know of anyway to mess with the view state with javascript to
programmaticall y add these values to a dataset. Good luck! Ken.

P.S. If you can't use a modal form then you can send your data directly back
to the hidden field on your main page with the following line:
window.opener.d ocument.getElem entById('hidden field').value = data;
window.close(); (automatically closes your popup)

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Sanjeev Mahajan via .NET 247" <an*******@dotn et247.com> wrote in message
news:OQ******** ******@TK2MSFTN GP14.phx.gbl...
Hi All,

I have a main page from which I am calling a popup page. The popup page has
an editable grid and some other fields. There is also a Save button on the
popup page. When the user clicks the Save button on the popup page, I want
to save the values in the datagrid as a dataset into the ViewState of the
main page. Can I access the ViewState of the main page in the popup page? If
not, what is the way out?

Thanks,
Sanjeev

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>aWgslaBQnku IZNKxza7RSg==</Id>
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
1593
by: Jack | last post by:
Hi, This is a strange problem I am encountering. I have a asp page with a confirmation.asp page that saves data to a table. There are few text fields that are captured by the confirmation page as l_f_name = Request.Form("txt_Name") l_f_personstitle = Request.Form("txt_Title") l_f_PhoneAreaCode = Request.Form("txt_PhoneAreaCode") l_f_Phone1 = Request.Form("txt_Phone1") l_f_Phone2 = Request.Form("txt_Phone2") l_f_Date =...
7
2116
by: bu | last post by:
I have a form with a handful of comments fields. I am trying to code the form in such a way that when the user clicks on the field, a dialog box will open up displaying the full contents of the field. I want to reuse the same window for each field ( seems sensless to code a screen n times for n fields when the only thing that is really changing is the source data ), but am having all sorts of issues. I have tried dynamically setting the...
11
2858
by: kaosyeti | last post by:
i have a form that records 9 fields into a table. on that form i have a 'done' button to close the form. right now, if the form is fully filled in, but you don't press 'enter' before you click 'done', then it closes the form without saving the record. can i change this? thanks. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200511/1
2
2345
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last, Fax, Phone, Category). Put an Edit column at the end... Now what?! If you go into Edit mode -- you can only edit 5 cells -- not all the rest of the Record's fields...not enough!
4
8166
by: jwlum | last post by:
I have the following problem under Internet Explorer only: 1. User fills out form data (myform.php) and clicks a button that fires myFunction() 2. myFunction() spawns a "hello, world" popup page via window.open 3. myFunction() submits the main page's form via document.form.submit() 5. User closes popup window and clicks browser's Back button to return to form entry page 6. All the form data that the user had filled out is now blank...
1
2610
by: adamredwards | last post by:
I have a page with some form elements that are dynamically generated. They are inserted into the dom by first cloning a node, changing the values like name, and then inserted with insertBefore(). When a field gets added, a link that opens a popup window is next to it. The popup is opened and has the name of the parent element it should change in it. The user can use the popup to get a list of results. In the results I would like them...
4
7840
by: ARC | last post by:
Hello all, I didn't use to have this problem in Access 97, but in 2007 (and maybe other versions of access after 97), if you have a form that has a subform, and you click the close button, you always get the following dialog: "Save changes to the following objects?" I tried putting a saverecord command prior to the close, but that had no affect. I have found a work around, but maybe I am making this too
3
2784
by: cmo | last post by:
Well I hope I this isn't too nebulous of a problem. The problem I currently have is this: I have a button in a form that opens up a javascript/css poup that has an input field and two ahref links for ok and cancel, both of which call the popup's toggle() method (same thing that is called from the button). The form that this button is in has fields that can be added or removed by the user. Everything works great in firefox and netscape,...
3
2212
by: RobEveryThingIsPossible | last post by:
IN VISTA MS Access 2000 Printer Settings Not Saving With Vista Bus. The printer settings (Label or Env.) keep on change back to another setting after saving them on a report or form, when viewing them on other Vista computers. I have tried many things see Example: Open my report in Design mode. Select Page Setup. On the Page tab, alongside Use Specific Printer, press the Printer button. Having selected your printer, press Properties....
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10104
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7645
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5541
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3843
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.