Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create controls in execution time in ASP.NET!!
Message
From
14/12/2006 13:38:26
Keith Payne
Technical Marketing Solutions
Florida, United States
 
 
To
14/12/2006 11:39:24
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01177638
Message ID:
01177707
Views:
4
>Hi all, im working in a project based in ASP.Net using Visual Studio.net 2003. Im developing a web page that uses label controls, textbox and link buttons. My problem is that im working on a query into this page where the web user enters a value in a textbox control and I want to add this textbox value in other page using a label control but I have to create this label control from the first page.
>
>Thanks for your help!!

Yuseff,

If you are talking about a second page that is redirected to upon completing the form on the first page, then you can pass the value to the second page using a URL querystring or the Application cache.

If you are talking about a second page that is already open in another browser window, then you must use javascript to retreive the value as long as the second browser window was spawned from the first page using window.open(). To do this, use the parent object in javascript to find the textbox control on the first page and update the HTML with the new value. You will have to do this with a timer on the second page or by explicitly calling the function on the second page by trapping the Submit button click event on the first page.

If it is not a redirect or if one page did not spawn the other browser window, then there is no simple way for them to communicate with each other.
UPDATE: Actually, you can still do this with two separate windows by creating a web service that stores the value in a file. The web service will have update and retrieve methods. The first page will set the value with the update method, and the second page will get the value with the retrieve method. But you will still have to deal with the timing of the web service calls in each page.
Previous
Reply
Map
View

Click here to load this message in the networking platform