i have a problem to display the data inserted at parent page.After i click a button submit at child page,the data that was inserted before are lost...can anybody give a solution to me how to remain the data after refreshing the parent page???
tq
5 1878
tq, welcome to TSDN!
Can you give some example code for the parent and child pages?
i have parent page that consist of two text box to insert name and department.There are also 1 button to open child page.
The code behind for the PARENT PAGE is: - Partial Class testParent
-
Inherits System.Web.UI.Page
-
-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
If Not Page.IsPostBack Then
-
Response.Cookies("ID").Value = TextBox1.Text
-
-
Me.Button1.Attributes.Add("onclick", "window.open('testChild.aspx','myWindow','height=600px,width=700px,top=200,left=200')")
-
Else
-
-
-
End If
-
Me.TextBox1.Text = Trim(Request.Cookies("ID").Value)
-
-
End Sub
-
-
End Class
-
At the child page, user can choose the department.After click submit button,the textbox value for NAME inserted before open the child page are dissapeared.
CODE FOR CHILD PAGE: - Partial Class testChild
-
Inherits System.Web.UI.Page
-
-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
If Not Page.IsPostBack Then
-
Dim IDGet As String
-
IDGet = Request.Cookies("ID").Value
-
''//with this IDGet, run the command and fill ds or whatever and then//
-
Me.TextBox1.Text = IDGet
-
Dim cScript As String
-
cScript = "<script language='javascript'> opener.location.href = 'testParent.aspx'; </script>"
-
ClientScript.RegisterStartupScript(Me.GetType, "parentwindow", cScript)
-
End If
-
Response.Cookies("ID").Value = Me.TextBox1.Text
-
End Sub
-
-
-
-
Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
-
End Sub
-
-
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
-
Response.Cookies("ID").Value = Me.TextBox1.Text
-
Response.Write("<script>window.close();</script>")
-
-
End Sub
-
End Class
Hmm..this is VB code. Can you not show the generated source code instead?
Hi, what is generated source code...can u explain to me :)
tq
Hi, what is generated source code...can u explain to me :)
View source in your browser.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Joe D |
last post by:
I think this is a simple question. But I am new to JS. Here is what I
want to do:
From a parent window, open a popup window (child) to get data from
user, then user submit the request, close the...
|
by: Mike |
last post by:
List,
I call this a "Parsing Problem", but it could be called formatting or
regular expressions as well. I have a set of data that was formerly
processed on an OS390 (hence a lot of...
|
by: Reinhold Mannsberger |
last post by:
Hello
I want to pass data from one page to another, more specifically I want to pass data from a child page to a parent page
My parent page (parentpage.htm) does
----...
|
by: dbuchanan |
last post by:
Hello,
Windows forms & database
What are the considerations when choosing how to display reference
information from the calling form? What is recommended?
Table1 is the parent of Table2.
...
|
by: ads |
last post by:
hi guys,
Here's the scenario:
i have a gridview on a parent page. Then i open another (child) page where i
can modify the data on the dridview.
How do i update the gridview soon as i do...
|
by: epaetz |
last post by:
Is there a way to decouple the linkage between a parent and a child
window?
Does the parent window have any sort of a collection that holds all the
children that it has spawned?
I want to...
|
by: Ravi Kishore |
last post by:
Hi all,
I have a problem while sending the data to and fro a JSP page. When i
click a link on a JSP page(say parent.jsp), i have to open a diff
page(say child.jsp), get the data from that page and...
|
by: Buddha |
last post by:
Hello,
I posted this on two forums, without too much help .. and I am kinda
stuck in this.
I need to refresh the parent page from the second child window which
is opened by the first child and...
|
by: doxtor |
last post by:
Hi..
I have a form, there is a combo box there name school. Beside there'is a link to open a child window to add a new data school. To open this popup, i use greybox jquery plugin. work ok until...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |