How to detect a modified textbox in webservercontrols

T

ton

Hi,
I've developed a server control which shows a database record. The fields
are showen in 2 columns and the added controls depends on the datatype.
I use textboxes, chekcboxes and dropdownlists

Now I'm adding a server procedure, but how can I detect that one of the
fields has been modified.
Is there another way than just comparing these fields with the original
value in the database.

Ton
 
T

ton

for those who do not understand what I meant the procedure is to SAVE the
data

Now I'm adding a SAVE procedure
 
A

Alessandro Zifiglio

hi ton, when processing postback data you can compare the old fields with
the new fields and if changed fire an event. This can be done by having your
control implement the IPostBackDataHandler interface.
For a control to be able to examine form data that is posted back by the
client, it must implement the System.Web.UI.IPostBackDataHandler interface.
The contract of this interface allows a control to determine whether its
state should be altered as a result of the postback and to raise appropriate
events.
More with sample code here :
http://msdn.microsoft.com/library/d...de/html/cpconpostbackdataprocessingsample.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top