R
Radu
Hi.
User enters ProductID. When he clicks on the "ADD" button, I need to
a. search in my database
b. if no record is found for that ID, then allow code to add a new
record to my table
c. if a record is found, I should ask the user "a product with this ID
already exists, with this and that characteristics. Do you still want
to add a new record (Y/N) ?"
My problem is how to create such a modal dialogbox from code-behind,
read the user's answer, and depending on that, continue or not with my
function.
I cannot add a javascript "confirm" code to my "ADD" button because
first I need to search in the database and then maybe ask the user if
I should continue or not - if I had such a javascript code, then the
question would be asked first, before the server code having a chance
to run. However, I need to ask the question in the middle of my code-
behind "ADD" function.
Thank you very much
Alex.
User enters ProductID. When he clicks on the "ADD" button, I need to
a. search in my database
b. if no record is found for that ID, then allow code to add a new
record to my table
c. if a record is found, I should ask the user "a product with this ID
already exists, with this and that characteristics. Do you still want
to add a new record (Y/N) ?"
My problem is how to create such a modal dialogbox from code-behind,
read the user's answer, and depending on that, continue or not with my
function.
I cannot add a javascript "confirm" code to my "ADD" button because
first I need to search in the database and then maybe ask the user if
I should continue or not - if I had such a javascript code, then the
question would be asked first, before the server code having a chance
to run. However, I need to ask the question in the middle of my code-
behind "ADD" function.
Thank you very much
Alex.