473,513 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bound Property problem

I added a property to the asp.net textbox. It is set as bindable and i am
able to do so. When i go to read the property the value is not there.

Somehow it isn't persisted on the server. I tried using ViewState() to set
and read the property and it did nothing. Here is the code I am using.

Any help is really appreciated.

Thanks..
Tommy

Imports System.ComponentModel
Imports System.Web.UI
<ListBindable(True)> Public Class clsTextBox
Inherits System.Web.UI.WebControls.TextBox
Private _iPricePk As Integer
<Bindable(True), _
NotifyParentProperty(True), _
PersistenceMode(PersistenceMode.InnerProperty)> _
Public Property iPricePK() As Integer
Get
Return Me._iPricePk
End Get
Set(ByVal Value As Integer)
Me._iPricePk = Value
End Set
End Property
End Class
Nov 22 '05 #1
2 1261
Tommy,

With the change to answer your question wrong.

I do not know how you are using this code, however to make it more clear.

In a webform is nothing persistent on the server. Everything should be
stored in the viewstate or a session when it is about page information and
to be retrieved back from the page (viewstate) or server (session).

The term for that is "a webform is stateless"

I hope this gives some idea's

Cor
Nov 22 '05 #2
I should have given more details...

I have to create a page with close to 100 textboxes on it to display a bunch
of pricing information. They will be grouped so I am using nested repeaters
(or trying to). I have the textboxes in the repeaters bound to the
datasource but it seems i have to manage my own updates. I cannot seem to
get the pre-canned stuff to work. (ds.update). The page will look similar to
a spreadsheet and all textboxes have to be enabled all the time so using the
grid is out.

I thought if I added a property to the textbox and bind it to the primary
key field it came from i can easily iterate through the controls collection
of each repeater and do the update like that.

I'd be very interested in hearing if anyone else has another idea on how to
accomplish this. It seems asp.net isn't really geared to handle this without
a bit of creativity.

Thanks for your answer.

Tommy
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Tommy,

With the change to answer your question wrong.

I do not know how you are using this code, however to make it more clear.

In a webform is nothing persistent on the server. Everything should be
stored in the viewstate or a session when it is about page information and
to be retrieved back from the page (viewstate) or server (session).

The term for that is "a webform is stateless"

I hope this gives some idea's

Cor

Nov 22 '05 #3

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

Similar topics

5
2212
by: Steve Strik | last post by:
My Problem: I have created a database here at work that is exhibiting some very strange behaviour. Essentially the database is structured in a manner where one table is a master record table...
19
4066
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
1786
by: Matthew Woods | last post by:
Hi, is there any way to format and order the columns displayed in a datagrid bound to a class that inherits from IBindingList? i have used DataGridTableStyle and added DataGridTextBoxColumns to it...
7
2811
by: vsiat | last post by:
I am trying to create a treeview out of a database table with the typical structure ID, NAME, PARENTID, TYPE, EXTRA_INFO, where is linked to the . What I want to achieve is create a tree made...
0
1675
by: Dave | last post by:
Hi all, I have a listbox that is complex bound by an arraylist. The problem is that when I delete an object from the arraylist, the listbox does not reflect those changes. I tried refreshing...
2
1949
by: Crazy Cat | last post by:
I am using a data-bound combobox with dropdownstyle set to dropdownlist. Teh combobox is bound to a bindingsource which is in turn bound to a table in my database. The table has only 4 rows and I...
0
2196
by: mjsterz | last post by:
I've been working with VB .NET for less than a year and this is the first time I've posted on one of these groups, so let me apologize beforehand if I'm being unclear, not posting my issue...
0
1993
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
4
1685
by: sklett | last post by:
(I posted this in a databinding NG, but it's a VERY low traffic NG so I thought I would post here as well. I hope no one minds too much, if you do I'm sorry) I have a DGV that is bound to a...
0
2480
by: Mike | last post by:
So here's the situation (.NET 2.0 btw): I have a form, and on this form is a textbox among many other databound controls. The textbox is bound to a field in a data table via the Text property. ...
0
7265
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,...
0
7171
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...
0
7388
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,...
0
7545
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...
1
7111
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...
0
7539
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5692
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,...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1605
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 ...

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.