473,770 Members | 7,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2210
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="postda ta();" />

<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.Selec tedNode.Text

hOrgVal.Value = TreeView1.Selec tedNode.Value

End Sub

<script type="text/javascript">

function postdata(){

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

top.opener.docu ment.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.docu ment.forms[0].elements["hidOrg"].value = <%="somevalue " %>;

"sara" <sa**@discussio ns.microsoft.co m> wrote in message
news:B2******** *************** ***********@mic rosoft.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
3938
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 |_Report4
0
464
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 problems with any of the other dlls in the app. I have asked www.obout.com about this but they do not know. How do I prevent the DLL from getting removed from the solution?? or please recommend a treeview that I can expand and collapse...
1
693
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 Treeview event I am dynamically trying to load the child nodes to the exisisting TreeView. The problem is since the TreeView is being loaded on not a Postback, I am unable to refer to any node in the TreeView event. Can anybody tell me how to...
8
12776
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 form. I only want to allow single selection, so using checkboxes is out of the question. It works as is, but it makes the form very cumbersome if every time that a user selects a node, the whole page has to reload. Is there a way to have a node...
1
4936
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 nodes 1 to 10, but when the user clicks , the tree will display nodes 11 to 20. Page 1 will is loaded when the page that contains the ascx (parent of the treeview) is loaded. This is all cool. The treeview displays correctly. When I click the ...
26
8531
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 to look like a column of buttons that expand to show the child nodes (if there are child nodes) qithout a postback. I don't want to display the plus/minus or any other expand/collapse graphic. ?
2
5511
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 programmatically. And I want to bind the selection of a TreeNode (which is a record) from the database) to a DetailsView which shows the datatable record for the selected TreeView node in the Details View. I am using IDE : Visual Web Developer 2005 Express; OS=...
1
3939
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 selected node but the screen is not scrolled to it. How can I get the TreeView to show the selected node after it has been refreshed?
2
2914
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 TreeView, the page stops auto-refreshing. Any ideas why this is happening? I have acheived auto refresh using the following:
0
9591
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
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10057
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...
1
10002
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7415
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
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.