473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1256
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
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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...

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.