473,394 Members | 1,869 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,394 software developers and data experts.

Data not saving during postback

I have the user selecting a record on one page of the web app I'm working on.
After they select a record, I save the record into a session variable and
submit the main page (in another window). In the main page I then set some
edit boxes to the values contained in the record.

The only problem with this scenario is that the data is not being saved in
the edit boxes during the postback. Here's the javascript code I'm using to
submit the main form:

window.opener.document.forms["Form1"].submit();
window.close();

I was wondering if anyone would be able to offer any suggestions about this
problem.

Thanks!
Nov 18 '05 #1
2 1815
If you put a breakpoint in the save method, is it being called? My guess is
that calling window.opener..submit() indeeds submits the form, but won't let
the save button's eventhandler get hooked up. You might be able to
manipulate the __EVENTTARGET hidden field to achieve what you want.

Karl

"Paul K" <Paul K@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com...
I have the user selecting a record on one page of the web app I'm working on. After they select a record, I save the record into a session variable and
submit the main page (in another window). In the main page I then set some edit boxes to the values contained in the record.

The only problem with this scenario is that the data is not being saved in
the edit boxes during the postback. Here's the javascript code I'm using to submit the main form:

window.opener.document.forms["Form1"].submit();
window.close();

I was wondering if anyone would be able to offer any suggestions about this problem.

Thanks!

Nov 18 '05 #2
The record is getting saved into a session variable in the child window (via
the datagrid itemcommand handler). After this a hidden control value is set
so that client-side javascript knows when to submit the form on the main
window and close the child window.

I'm setting the values in the edit boxes during the page load handler in the
main window. During debugging, the values in the edit boxes are set
correctly. However, when the page loads there is nothing in the controls.

What I am wondering is if submitting the form directly is causing problems
with the postback process.

"Karl" wrote:
If you put a breakpoint in the save method, is it being called? My guess is
that calling window.opener..submit() indeeds submits the form, but won't let
the save button's eventhandler get hooked up. You might be able to
manipulate the __EVENTTARGET hidden field to achieve what you want.

Karl

"Paul K" <Paul K@discussions.microsoft.com> wrote in message
news:23**********************************@microsof t.com...
I have the user selecting a record on one page of the web app I'm working

on.
After they select a record, I save the record into a session variable and
submit the main page (in another window). In the main page I then set

some
edit boxes to the values contained in the record.

The only problem with this scenario is that the data is not being saved in
the edit boxes during the postback. Here's the javascript code I'm using

to
submit the main form:

window.opener.document.forms["Form1"].submit();
window.close();

I was wondering if anyone would be able to offer any suggestions about

this
problem.

Thanks!


Nov 18 '05 #3

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

Similar topics

4
by: Bill | last post by:
I have a DataSet that is serialized to a local disk. One of the testers recently experienced a problem where data was saved and the Tablet PC she was testing later went offline. When she restarted...
2
by: Duwayne | last post by:
I am having lots of trouble with one of my user controls (ascx) not automatically loading postback data. An image on the aspx page starts the postback and the parent has no problem loading it's own...
5
by: Rod | last post by:
I've written 2 ASP.NET applications (I've worked on one with a team and another by myself). In my ASP.NET pages, when saving data to a backend database I've done it by using the click event of a...
0
by: DKode | last post by:
Hello, I am trying to call a UserControl after postback to save data filled out on that usercontrol to sql server. The problem I am having is this, I have 2 LinkButtons that I have setup as...
6
by: et | last post by:
In a procedure where a user creates a password, among other things, the password textbox returns to blank whenever a user selects other fields that cause a postback, even though they are not done...
4
by: =?Utf-8?B?UGF1bCBSZWVk?= | last post by:
Greetings. I have an app that's been in production for 3-4 years that is hosted at an ISP. I have an aspx control on the page that uses a few hidden text fields for repositioning logic executed...
2
by: Knoxy | last post by:
Hi guys, I'm using a gridview to do some inline editing. The data binds okay, its goes into edit mode and cancel okay. I'm using my own custom commandName, "save", and it picks this up okay. Don't...
0
by: rvdnieuwenhuizen | last post by:
Hi, The problem I cannot seem to solve: I have a page with a button control. In the On_Click eventhandler I dynamically add one TextBox each time the button is clicked. I add the textboxes to...
1
by: m.a | last post by:
Hello, I want to investigate that data that is send to server during a postback. I want to know it so I can optimize the postback data to speed up the postback. It seems that my current...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.