Author: Adam12345 | Posted on: 6/16/2010 1:43:49 PM | Views : 326

Let's say I have a website where users can comment and rate my articles, images etc.
What I want to do is to store user's ip adress ( which I have already done + I'm storing adresses as bigint in my DB ) and then compare it.
If it exists and the user is trying to rate or comment the same image/article within a short period of time ( 5 minutes) then i want not to allow him to do so.
My question is how can I compare smalldatetime to another one?
here is my button click event code:

protected void Button1_Click(object sender, EventArgs e) { public Class1 class1 = new Class1(); ipClass convert_ip_class = new ipClass(); int id = Convert.ToInt32(HiddenField2.Value); string strIpAddress = IpAddress(); long ipa = convert_ip_class.ConvertIPToLong(strIpAddress); class1.IpAdressQuery(ipa, date); string comment ...

Go to the complete details ...