two dropdownlist compare same values

Posted by Ramakrishna188 under ASP.NET on 7/13/2012 | Points: 10 | Views : 2671 | Status : [Member] | Replies : 3
hi all,
my requirement is.
I have two dropdownlist firt dropdownlist name is ddlstockname and second one is ddldepartmentname
suppose first time i selected in ddlstockname is "papers" and first time selected ddldepartmenname is
"lab" . second time if i select same "papers" and "lab" i want display one message box like this stockname already given to
"lab" department. if ddlstocknaem select "papers" and select another ddldepartmentname it's ok.
please send me . thankyou.




Responses

Posted by: Sekar.C on: 7/13/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
send your table structure .

Regards
Sekar.c

Ramakrishna188, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: .Netlearner on: 7/13/2012 [Member] Starter | Points: 25

Up
0
Down
Once you choose any item in ddlstockname and corresponding item in ddldepartmentname you will be storing in database na ? I Hope so, in that case before inserting into the database you can check whether corresponding Departmentname has the stockname using its ID/Name.If its already present Display the message as you said.Else Insert into database.Hope this works.

Ramakrishna188, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 7/13/2012 [Member] Starter | Points: 25

Up
0
Down
hi
you should make query using AND operator if both value already exists then alert message otherwise not

Regards


R D Patel

Ramakrishna188, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response