Check for form changes

J

JIK

Hi.

I have a web app written in ASP.NET/C# with a lot of textboxes, dropdowns
etc.
Is there any possibilities to check for changes in texboxes etc in a web
form on the client side easily?
And on the server side?


Jon
 
C

Corey O'Mara

Client side is good old JavaScript... there's nothing about ASP.NET that
will help you there.

Server side, however, ASP.NET can help! You could take advantage of the
"Change" events for your ASP.NET controls... if the event (or events) fire,
then you know the values have been changed. You can even tie multiple events
(the change event for each control) to a single event handler to centralize
the processing of the events.

Corey O'Mara
MCSD.NET, MCT
 
J

Jon Kleveland

Thanks - but...

I know I have to use Java on the client side - is it any easy way to
check if the user have done any changes?

On the server side - by using the Change event - will it then do a
roundtrip from client to server for every change the user makes?



Jon
 
C

Corey O'Mara

There's no "easy" way that I know of to write that Javascript (has it ever
been easy?).

As for the server side, the page won't make a roundtrip for every change the
user makes unless you have a control's "AutoPostBack" property set to true.
If not, the server side events will fire when the page does a round trip
based on the user pressing a button, etc.
 
J

JIK

Thanx,

Do you, or anyone, have som samples of java-code to use?
I want to have code that checks for changes and waarn the user if he try to
navigate away from the page without saving...


Jon
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top