473,326 Members | 2,128 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,326 software developers and data experts.

TreeView postback to calling page?

I have page A with form field and a button and when button is clicked it
opens page B in another window. Page B has a treeview control and that is
all. When something is selected I want the page B item to pouplate a form
field on page A. Can this be done and how?
Nov 19 '05 #1
2 2176
Hi Harold
i have an ideas i hope that help
when u fire your events in page B u can put a certain ID in a session say
session("ID")=1 and reload page A
and put condition in page A when session("ID")=1 do want u want
i try this before and it's work
"Harold" wrote:
I have page A with form field and a button and when button is clicked it
opens page B in another window. Page B has a treeview control and that is
all. When something is selected I want the page B item to pouplate a form
field on page A. Can this be done and how?

Nov 19 '05 #2
This is what I did. On page B with the treeview I added a HTML Button, and 2
hidden asp.net fields to the page.
<input id="btnClose" type="button" value="Close" onclick="postdata();" />

<input id="hOrgText" type="hidden" runat=server />

<input id="hOrgVal" type="hidden" runat=server />

Sub TreeView_Select(ByVal sender As Object, ByVal e As EventArgs)

'Set the hidden forms fields so javascript can send the values back to
calling page.

hOrgText.Value = TreeView1.SelectedNode.Text

hOrgVal.Value = TreeView1.SelectedNode.Value

End Sub

<script type="text/javascript">

function postdata(){

top.opener.document.forms[0].elements["txtOrg"].value =
document.forms[0].item("hOrgText").value;

top.opener.document.forms[0].elements["hidOrg"].value =
document.forms[0].item("hOrgVal").value;

window.close();
}

</script>

Now I can post the variables back to the calling page without reloading it.

I tried this which didn't work for me. Someone can tell me why.
top.opener.document.forms[0].elements["hidOrg"].value = <%="somevalue" %>;

"sara" <sa**@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
Hi Harold
i have an ideas i hope that help
when u fire your events in page B u can put a certain ID in a session say
session("ID")=1 and reload page A
and put condition in page A when session("ID")=1 do want u want
i try this before and it's work
"Harold" wrote:
I have page A with form field and a button and when button is clicked it
opens page B in another window. Page B has a treeview control and that
is
all. When something is selected I want the page B item to pouplate a
form
field on page A. Can this be done and how?

Nov 19 '05 #3

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

Similar topics

2
by: George M. | last post by:
I'm working with the treeview control on an ASP.NET page (written in C#), and I have one built the looks something like: Root |_Category1 |_Site1 |_Report1 |_Report2 |_Site2 |_Report3...
0
by: xzzy | last post by:
I am using www.obout.com 's treeview control and their postback dll ( for an aspx web page ). The treeview and no postback works, BUT the postback dll keeps getting removed from the solution. No...
1
by: kvicky | last post by:
I am trying to load child nodes to a TreeNode in a TreeView in a ASP.net web application. The Treeview with parent nodes are loaded on a Page_load while doing if( ! ISPostback ) and then in the...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
1
by: doemon | last post by:
Hi, I'm working on a pagination control and I need to dynamically rerender a treeview to display the next set of nodes depending on which page we're on. For example, page 1 will dispaly only...
26
by: JJ | last post by:
Is there any way you can expand a parent node on the treeview control _without a postback_ by clicking on the node text (NOT clicking the expand image URL) ? I want to format the treeview node...
2
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created...
1
by: =?Utf-8?B?Rmx5Z3V5?= | last post by:
I have a TreeView with so many nodes that it requires scroll bars. When the user selects a node the screen is refreshed and the selected node is no longer visible. The TreeView is opened to the...
2
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a web page that has a TreeView on it. If I DONT'T expand the TreeView nodes, the auto refresh works nicely: my page gets refreshed every minute. As soon as I expand a node on the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
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 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.