Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
OK guys,

I have a text box that user puts donation amount into, I need a way to query the database to check if the user has input a higher amount, If so send the details of the user to a different table called Hall_Of_Fame. the users details at the moment are sent to a tabel named Customers .

There are many things they can donate to which are chosen through a selection of drop down list first drop down is ddlcountry that then determines what the second drop down DdPetPist is populated with.

I have a query that works out the users selection, this prints out the price of there final selection in a label PetPrice.Text.

If they put in a greater number I would like to send there details into Hall_Of_Fame to use elsewhere.

is there a way to do this using a if else statement and this query?

Query and code
C#
string selection = DdPetPist.SelectedValue;

    ("SELECT (Price)
    FROM (Animals)
    WHERE (Specie) ='{1}'
    and (Country) ='{0}'
    ", ddlcountry.SelectedItem.ToString().Trim(), selection_price), cs)

PetPrice.Text = String.Format("Minimum Donation For A {0}  Is {1} In Your Country.", selection, petPrice);
Posted
Updated 28-Nov-13 8:55am
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900