Imports System.Data

Partial Class viewSingleNews
    Inherits System.Web.UI.UserControl

    Protected Sub grdFill()
        Dim db As New FirstClass()
        Dim dt As New DataTable()

        dt = db.dbOut("SELECT TOP 100 PERCENT tblNews.NewsID AS nwsID, tblNews.NewsTitle as nwsTitle, NewsGroups.NewgGroupDescription as nwsGroup, Users.Name + N' ' + Users.Sname AS Expr1, tblNews.DateOfAdding as nwsDtadd, tblNews.NewsPic, tblNews.newsBody as nwsBodyes" & vbCr & vbLf & " FROM tblNews INNER JOIN Users ON tblNews.UserName = Users.UserName INNER JOIN NewsGroups ON tblNews.NewsGroupID = NewsGroups.NewsGroupID WHERE (tblNews.NewsID = '" & Integer.Parse(Request.QueryString("NewsID").ToString()) & "') ORDER BY tblNews.NewsID DESC")
        'NewsID 
        GridView1.DataSource = dt
        GridView1.DataBind()
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        grdFill()
    End Sub
End Class
