Click here to Skip to main content
15,889,462 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Can AngularJS use only with MVC or we can use it with Asp.Net application. Pin
Richard MacCutchan5-Feb-17 23:19
mveRichard MacCutchan5-Feb-17 23:19 
AnswerRe: Can AngularJS use only with MVC or we can use it with Asp.Net application. Pin
Nathan Minier6-Feb-17 1:41
professionalNathan Minier6-Feb-17 1:41 
GeneralRe: Can AngularJS use only with MVC or we can use it with Asp.Net application. Pin
Abhijit Mindcraft6-Feb-17 1:53
Abhijit Mindcraft6-Feb-17 1:53 
GeneralRe: Can AngularJS use only with MVC or we can use it with Asp.Net application. Pin
Nathan Minier6-Feb-17 1:58
professionalNathan Minier6-Feb-17 1:58 
QuestionDisplay message to the user if no records found? Pin
samflex30-Jan-17 8:14
samflex30-Jan-17 8:14 
AnswerRe: Display message to the user if no records found? Pin
ZurdoDev30-Jan-17 8:33
professionalZurdoDev30-Jan-17 8:33 
AnswerRe: Display message to the user if no records found? Pin
Richard Deeming30-Jan-17 8:41
mveRichard Deeming30-Jan-17 8:41 
GeneralRe: Display message to the user if no records found? Pin
samflex31-Jan-17 5:26
samflex31-Jan-17 5:26 
Hi Richard,

As usual, thanks so much for your constructive help.

I was able to get it to for me, slightly different from my original idea but we are fine with the results from the code below:

PHP
Private Sub BindGrid()
    Dim s As String = ""
    Dim reportType = ddlrpttype.SelectedValue

    conn.Open()

    If reportType = "Today" Then
        s = "SELECT * from mytable WHERE (DATEDIFF(day,CONVERT(datetime,mytable.date, 121),GETDATE()) = 0)  ORDER By date DESC "
    ElseIf reportType = "Yesterday" Then
        s = "SELECT * FROM mytable  WHERE (DateDiff(Day, Convert(DateTime, mytable.date, 121), GETDATE()) = 1)  ORDER By date DESC "
    ElseIf reportType = "All" Then
        s = "select * from mytable ORDER By mytable_no DESC "
    Else
        s = "select * from mytable ORDER By mytable_no DESC "
    End If
    Dim cmd As New SqlCommand(s)
    reportgrv.DataSource = GetData(cmd)
    reportgrv.DataBind()
    'Showing Numbers in Label
    Dim iTotalRecords As Integer = DirectCast(reportgrv.DataSource, DataTable).Rows.Count
    Dim iEndRecord As Integer = reportgrv.PageSize * (reportgrv.PageIndex + 1)
    Dim iStartsRecods As Integer = iEndRecord - reportgrv.PageSize

    If iEndRecord > iTotalRecords Then
        iEndRecord = iTotalRecords
    End If

    If iStartsRecods = 0 Then
        iStartsRecods = 1
    End If
    If iEndRecord = 0 Then
        iEndRecord = iTotalRecords
    End If
    lblTotalRecords.Text = "Total records Found: " & iTotalRecords.ToString() & ""
End Sub


And yes, you are absolutely correct, the date data type is of varchar. I don't design databases like this. I inherited this.

On a separate note, please forgive me for saying this.

This guy that calls himself RyanDev, I just would hope he can learn to avoid my threads.

I have followed some of his post and a lot of them laden with insults.

My parents thought us that if you don't have anything good to say, don't say anything at all.

He must have been raised from a family environment where insults reign. He certainly is a good student because he copied very well.
GeneralRe: Display message to the user if no records found? Pin
ZurdoDev3-Feb-17 3:26
professionalZurdoDev3-Feb-17 3:26 
QuestionStrange behaviour .net 2/4: The object of type "System.Web.UI.WebControls.Label" can not be converted to type "System.Web.UI.WebControls.TextBox". Pin
Markus Evacoso25-Jan-17 11:24
Markus Evacoso25-Jan-17 11:24 
SuggestionRe: Strange behaviour .net 2/4: The object of type "System.Web.UI.WebControls.Label" can not be converted to type "System.Web.UI.WebControls.TextBox". Pin
ZurdoDev26-Jan-17 0:54
professionalZurdoDev26-Jan-17 0:54 
GeneralRe: Strange behaviour .net 2/4: The object of type "System.Web.UI.WebControls.Label" can not be converted to type "System.Web.UI.WebControls.TextBox". Pin
Markus Evacoso26-Jan-17 20:56
Markus Evacoso26-Jan-17 20:56 
AnswerRe: Strange behaviour .net 2/4: The object of type "System.Web.UI.WebControls.Label" can not be converted to type "System.Web.UI.WebControls.TextBox". Pin
F-ES Sitecore26-Jan-17 22:37
professionalF-ES Sitecore26-Jan-17 22:37 
GeneralRe: Strange behaviour .net 2/4: The object of type "System.Web.UI.WebControls.Label" can not be converted to type "System.Web.UI.WebControls.TextBox". Pin
Markus Evacoso22-Jun-17 23:44
Markus Evacoso22-Jun-17 23:44 
Question<Projectname>.config in bin folder Pin
Markus Evacoso25-Jan-17 10:55
Markus Evacoso25-Jan-17 10:55 
AnswerRe: <Projectname>.config in bin folder Pin
ZurdoDev26-Jan-17 0:51
professionalZurdoDev26-Jan-17 0:51 
GeneralRe: <Projectname>.config in bin folder Pin
Markus Evacoso26-Jan-17 20:51
Markus Evacoso26-Jan-17 20:51 
AnswerRe: <Projectname>.config in bin folder Pin
Bryian Tan28-Jan-17 12:46
professionalBryian Tan28-Jan-17 12:46 
QuestionWhat we can do with date and time offset data Pin
Tridip Bhattacharjee24-Jan-17 22:43
professionalTridip Bhattacharjee24-Jan-17 22:43 
AnswerRe: What we can do with date and time offset data Pin
Jochen Arndt24-Jan-17 23:05
professionalJochen Arndt24-Jan-17 23:05 
GeneralRe: What we can do with date and time offset data Pin
Tridip Bhattacharjee25-Jan-17 0:45
professionalTridip Bhattacharjee25-Jan-17 0:45 
GeneralRe: What we can do with date and time offset data Pin
Jochen Arndt25-Jan-17 1:07
professionalJochen Arndt25-Jan-17 1:07 
GeneralRe: What we can do with date and time offset data Pin
Tridip Bhattacharjee29-Jan-17 22:35
professionalTridip Bhattacharjee29-Jan-17 22:35 
GeneralRe: What we can do with date and time offset data Pin
Jochen Arndt29-Jan-17 22:46
professionalJochen Arndt29-Jan-17 22:46 
QuestionHow to convert client local date and time to UTC date and time Pin
Tridip Bhattacharjee24-Jan-17 22:41
professionalTridip Bhattacharjee24-Jan-17 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.