473,408 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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>aWgslaBQnkuIZNKxza7RSg==</Id>
Nov 18 '05 #1
1 1515
Hi Sanjeev,

If you launch your popup as a modal window you can set the
window.resultValue 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
programmatically 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.document.getElementById('hiddenfield ').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*******@dotnet247.com> wrote in message
news:OQ**************@TK2MSFTNGP14.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>aWgslaBQnkuIZNKxza7RSg==</Id>
Nov 18 '05 #2

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

Similar topics

17
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...
7
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...
11
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...
2
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,...
4
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...
1
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(). ...
4
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...
3
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...
3
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.