Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
suppose,I have applied for job on clicking button1 and if i want apply again on clicking same button and for same job then We cant apply again means message should come already applied...plz help?
Posted 27-Jun-12 20:55pm
Edited 27-Jun-12 20:56pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

We cant apply again means message should come already applied
Two options. Either disable the button once it was clicked. OR better and strong way to handle it would be to keep a record in your DB on which userID has already applied for what all jobID. Refer this data before letting any user apply for a job. If a jobID already exists then it was already applied - show the message.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 28-Jun-12 2:11am
   
I voted 4 and would vote 5 if you would not mention option #1. It only creates the illusion of the solution, which is worse then no solution at all. First of all, you should have mentioned that the solution should be based on authentication. Right?
Please also see the solution 2 and my comment. Agree?
--SA
Sandeep Mewara at 28-Jun-12 2:16am
   
Option 1 was for instant way of avoiding re-submit of job. Being on the same page but not allowing to click the button twice.
Option 2 is valid in all the cases whatsoever as it is tied to particular user logged in.
 
About your point of mentioning authentication, if someone is allowed to apply for a job by a click it has to be a registered-logged in user, hence I used the reference of 'userId' in my answer too.
 
Thanks for clarification.
Sergey Alexandrovich Kryukov at 28-Jun-12 2:21am
   
Understood. I think we're agree.
Thanks for the discussion.
--SA
Vani Kulkarni at 28-Jun-12 2:59am
   
Good answer! My 5!
vangapallynaveen at 28-Jun-12 3:19am
   
Good answer! My 5!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

When the user hits the button for first time set some state somewhere i.e. have some specific value in hidden variable or viewstate or set some session variable.
 
then when the user hit again first check this variable and if it has been set don't do anything just show some message.
 
which state management you resort to depends on various project specific things so that your choice.
 
UPDATE:
 
But this will only work at most in the current session. TO make this behavior persistent for a particular user you need some sort of mapping table which will take care of tracking such things.
 
so if your DB there is something like a JobPostID, and a USERID. you could also have a ApplicationTracer table which will contain TrackerID, USERID, JobPostID.
 
so when ever user apply for a job you can check whether that job ID contains this UserID in the tracking table and let him apply. once he apply make entry in this tracking table to reflect the same.
  Permalink  
v2
Comments
Sergey Alexandrovich Kryukov at 28-Jun-12 2:12am
   
Well, what happens it the user closes everything and the session get expired? Will be able to apply again, right? I think it can be only based on authentication.
--SA
Rahul Rajat Singh at 28-Jun-12 2:14am
   
totally agreed. and thanks for pointing it out. I am updating the answer now.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Yes i completely agree with Sandeep Mewara.
To prevent seekers from applying on same job you need to keep track of applied jobs of job seekers.
  Permalink  
Comments
Sandeep Mewara at 28-Jun-12 2:40am
   
An upvote to my answer and leaving this as a comment to my answer will be more along the lines of support.
 
Thanks for supporting me. :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

The Better thing is that when anyone user can applied for job, then store Jobid and Userid in database. And when this user will try to apply for the same job check the function if user already apply then pop up message.
It just like the Duplication record checking.
 

 
Thank You.
  Permalink  

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

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 28 Jun 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