Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET validation
Hi,
 
I have few panels on page.
In one of the panels, there is a button with few editable controls.
User can edit these controls' values and use the button to see derived values.
 
However, we have a requirement to prompt user if the user moves out of the panel and goes to another panel without using the button.
 
Is it possible to catch such event? If yes, how?
Posted 5-Nov-12 20:38pm
Ashok26359
Comments
manognya kota at 6-Nov-12 1:44am
   
Are the panels in tabs?
Ashok26 at 6-Nov-12 11:16am
   
No.
One after another vertically on same page.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
As per my understanding, i guess..
1.You can have a hidden field flag to indicate whether the button was clicked or not.
2.In the client side events of the controls in Panel2, you can check whether that flag is set or not.
3.Then focus/display an alert message as required.
 

Correct me if i have understood the context wrongly.
Hope this helps.
  Permalink  
Comments
Ashok26 at 6-Nov-12 11:15am
   
This is my understanding of your reply:
ON each field in panel 2, do a client-side validation for change in any field in panel 1.
 
This could be tedious if there are many number of fields.
THis becomes even more complex if number of panels are more.
 
I have 10 panels on my page comprising of 200 fields. Few panels have grids too.
 
Is there any way to perform same check on panel level.
So, as soon as user clicks on the area of another panel, a javascript function can be called.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 150
2 Richard MacCutchan 135
3 Andreas Gieriet 100
4 DamithSL 95
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,260


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100