only let the user download once

Nick83

New member
Joined
Jul 7, 2008
Messages
1
Programming Experience
1-3
Hi I have a query that is really bugging me!!!

I currently have a label that displays the month as an int. i.e July = 7 This is called Monthtxt

I also have a database that has a username primary key and fields 1 - 12 one for each month. In those fields are 0 or 1. I have a detailsview that selects all of the fields where the username is equal to the current logged on user.

The problem that I have is that I know need to check if the current month has a 0 or a 1 next it then redirect them to the correct page. I am currently doing this

VB.NET:
Protected Sub DownloadBTN_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles DownloadBTN.Click

        DetailsView2.DataBind()

        If DetailsView2.FindControl(MonthTxt.Text) Is "1" Then


            Response.Redirect("DeclinePage.aspx")

        Else

            Response.Redirect("Success.aspx")

        End If
    End Sub

Please help its driving me insane
 

Latest posts

Back
Top