473,569 Members | 2,768 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

data binding in label field

I want to know how to dynamically bind the data in label field. My
requirement is that I need to display a label with a data which is retrieved
from preceding page and I want to use the data binding method to do that.
Can I use ViewState to store the value in the preceding page and then pass
to the label field of the next page?? If so, how to do that?
Million Thanks.
--
Best Regards,

Eric Yum
Nov 18 '05 #1
2 1375
With proper ViewState and ViewStateMac settings, you can pull info from
another page. It is not very easy in the current implementation. If you pull
the data, you can also siply pull again on the next page. While this may
seem less efficient, you have to remember that web apps are stateless.
Unless you are dealing with a lot of data, you will find that the pull is
very fast on page two, as well. And, if you are dealing with a lot of data,
you should not be sticking it in ViewState.

With Whidbey (next version of VS.NET), you will be able to easily pull info
from page to page.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** **********
Think Outside the Box!
*************** *************** *************** *************** **********
"Grey" <er*****@i-cable.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I want to know how to dynamically bind the data in label field. My
requirement is that I need to display a label with a data which is retrieved from preceding page and I want to use the data binding method to do that.
Can I use ViewState to store the value in the preceding page and then pass
to the label field of the next page?? If so, how to do that?
Million Thanks.
--
Best Regards,

Eric Yum

Nov 18 '05 #2
You can't use ViewState between pages, it's only good for the page you are
on, and even then it's really used for postbacks.

You'll have to use something else, this article should elaborate more. If
it's insensitive data best bet would probably be Form Post / Hidden,
Querystring, or cookies.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

Good luck,
--Michael

"Grey" <er*****@i-cable.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I want to know how to dynamically bind the data in label field. My
requirement is that I need to display a label with a data which is retrieved from preceding page and I want to use the data binding method to do that.
Can I use ViewState to store the value in the preceding page and then pass
to the label field of the next page?? If so, how to do that?
Million Thanks.
--
Best Regards,

Eric Yum

Nov 18 '05 #3

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

Similar topics

12
2270
by: Nhmiller | last post by:
When I start to type the data for a new record, I would like a dropdown box to open next to it from which I can choose the data from a previously entered record that starts with the same letter. This is the way my previous database, Approach, worked. I have tried using the form design toolbox wizard for this but have had no success. I perused...
4
5400
by: | last post by:
I have a datagrid with a template column that has a hyperlink and a label. The hyperlink text is bound to Title from my dataset and the label text is bound to Author in the dataset. The grid displays with the template columns showing the Title and the Author from the first row in all rows. The other none template columns are fine. Obviously...
9
5320
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be (filtered) dependent upon the selection in DDL1. I think this inevitably needs some code, but I'd be happy to be told otherwise! I have some code to...
1
3896
by: msmcg | last post by:
I need to format the data in some textboxes using the Binding method with custom Currency and ShortDate format and parse handlers. Here is the code that I am using. I call it on the form load event: Private Sub setTextBoxDataBindings()
0
1481
by: AM | last post by:
The following block of code defines a FormView control "FormView1" with an EditItemTemplate which has a Label and a TextBox control within it. While the Label "RequestIDLabel1" has one-way data-binding to the underlying column "RequestID", the TextBox "RequestDateTextBox" has two-way data-binding to the underlying column. If I were to...
0
2499
by: Sam | last post by:
I am trying to use a Simple form with 3 fields from SQL NorthWind Database (Order Details Table with 3 Fields. - OrderId, ProductId and Unit Price). The Field Unit Price has a data type of 'Money Type'. All I want is to able to edit/view/insert 'UnitPrice' field with 2 decimal points instead of 4 decimal points. If I use:...
0
2947
by: Sam | last post by:
Folks.. I am trying to use a Simple form with 3 fields from SQL NorthWind Database (Order Details Table with 3 Fields. - OrderId, ProductId and Unit Price). The Field Unit Price has a data type of 'Money Type'. All I want is to able to edit/view/insert 'UnitPrice' field with 2 decimal points instead of 4 decimal points.
3
2563
by: Homer J. Simpson | last post by:
I have the following stored procedure: ALTER PROCEDURE . AS BEGIN SET NOCOUNT ON; SELECT COUNT(*) FROM QUICKNOTES END ....and the following data source in my .aspx file:
2
1864
by: Igor | last post by:
Hi I build a page that has a dropdownlist control bound with data from a database. When user select an item from the dropdownlist I want a label to be filled with a result from a stored procedure. The stored procedure takes an ID of a selected item (@BoundID) from the dropdownlist and gives a result (@BoundIdentifier) as follows: ---...
0
7612
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...
0
7922
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. ...
1
7668
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...
1
5509
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...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
936
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...

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.