•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 362,352 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,807 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 15229 | Replies: 4
![]() |
•
•
Join Date: Feb 2005
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi everyone, here's my problem.
I have 3 web forms. WebForm1 contains a tab control "UltraWebTab1" with just 2 tabs.
First tab displays Target URL WebForm2.
Second tab displays Target URL WebForm3.
WebForm2 contains a label lblSourceLabel with a text value of '123'.
WebForm3 contains a label lblTargetLabel with a null value.
My goal is to transfer the lblSourceLabel value to lblTargetLabel upon tab change from tab1 to tab2. I'm using JavaScript, ASP.NET and Infragistics.
Here's my code, but it's not working. What am I doing wrong?
function sendValue()
{
// Get reference to UltraWebTab
var ultraTab = igtab_getTabById("UltraWebTab1");
if (ultraTab == null)
return;
//
// Get reference to 1st tab (WebForm2 )
var tab = ultraTab.Tabs[0];
// Get reference to 2nd tab (WebForm3)
var tab1 = ultraTab.Tabs[1];
//
var source = tab.findControl("lblSourceLabel ");
var target = tab1.findControl("lblTargetLabel");
target.value = source.value;
}
I have 3 web forms. WebForm1 contains a tab control "UltraWebTab1" with just 2 tabs.
First tab displays Target URL WebForm2.
Second tab displays Target URL WebForm3.
WebForm2 contains a label lblSourceLabel with a text value of '123'.
WebForm3 contains a label lblTargetLabel with a null value.
My goal is to transfer the lblSourceLabel value to lblTargetLabel upon tab change from tab1 to tab2. I'm using JavaScript, ASP.NET and Infragistics.
Here's my code, but it's not working. What am I doing wrong?
function sendValue()
{
// Get reference to UltraWebTab
var ultraTab = igtab_getTabById("UltraWebTab1");
if (ultraTab == null)
return;
//
// Get reference to 1st tab (WebForm2 )
var tab = ultraTab.Tabs[0];
// Get reference to 2nd tab (WebForm3)
var tab1 = ultraTab.Tabs[1];
//
var source = tab.findControl("lblSourceLabel ");
var target = tab1.findControl("lblTargetLabel");
target.value = source.value;
}
•
•
Join Date: Jul 2003
Location: Bamberg, Germany
Posts: 117
Reputation:
Rep Power: 6
Solved Threads: 2
You can do it with the Session and Application objects...but it's better if you use Cookies or GET/POST methods.
Since I am not at home, but at work which has limited resources, I hope this helps till I get chance to look at this problem more closely.
Here is a some links to passing values around with Javascript that may help!
LINK 1
LINK 2

Here is a some links to passing values around with Javascript that may help!
LINK 1
LINK 2

•
•
•
•
Originally Posted by omnis
Hi everyone, here's my problem.
I have 3 web forms. WebForm1 contains a tab control "UltraWebTab1" with just 2 tabs.
First tab displays Target URL WebForm2.
Second tab displays Target URL WebForm3.
WebForm2 contains a label lblSourceLabel with a text value of '123'.
WebForm3 contains a label lblTargetLabel with a null value.
My goal is to transfer the lblSourceLabel value to lblTargetLabel upon tab change from tab1 to tab2. I'm using JavaScript, ASP.NET and Infragistics.
Here's my code, but it's not working. What am I doing wrong?
function sendValue()
{
// Get reference to UltraWebTab
var ultraTab = igtab_getTabById("UltraWebTab1");
if (ultraTab == null)
return;
//
// Get reference to 1st tab (WebForm2 )
var tab = ultraTab.Tabs[0];
// Get reference to 2nd tab (WebForm3)
var tab1 = ultraTab.Tabs[1];
//
var source = tab.findControl("lblSourceLabel ");
var target = tab1.findControl("lblTargetLabel");
target.value = source.value;
}
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
•
•
Join Date: Jan 2006
Location: Its the internet... i am everywhere lol
Posts: 274
Reputation:
Rep Power: 3
Solved Threads: 10
in answer the original question your page references were incorrect. you have to get a reference to the calling page from the Server.Request object. Cast that to a Page object then findcontrol for your tabs. This is better than javascript as it is all done on the server. There are plenty of articles on how to get the calling page.
The alternative is to use session objects etc as mentioned above. The best way is to pass the information in as a query so when you redirect from one page to the other grab the labels value and pass it to the next page in the request eg www.yoursite.com/newpage?labelvalue='the value you just grabbed'
This will guarantee the value will get there (no relying on cookies being turned on etc) and easy to get at the other end
The alternative is to use session objects etc as mentioned above. The best way is to pass the information in as a query so when you redirect from one page to the other grab the labels value and pass it to the next page in the request eg www.yoursite.com/newpage?labelvalue='the value you just grabbed'
This will guarantee the value will get there (no relying on cookies being turned on etc) and easy to get at the other end
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
- Updated : Simple ASP.Net Login Page (ASP.NET)
- How is 3Tier architecture implemented in ASP.NET (ASP.NET)
- Making ASP.Net pages better looking (ASP.NET)
- Getting return values from oracle to ASP.NET (ASP.NET)
- ASP.NET and Mozilla - Issues! (ASP.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
- Javascript:How to transfer values between ASP.NET pages (JavaScript / DHTML / AJAX)
- ASP.NET problem (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Passing An Connecting String
- Next Thread: Get a Session state from a Query


Linear Mode