Imports System.Data.SqlClient Imports System.Configuration Public Class CatMenuCache Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. Private Sub InitializeComponent() End Sub Protected WithEvents MyCatList As System.Web.UI.WebControls.DataList Protected WithEvents lblMsg As System.Web.UI.WebControls.Label Protected WithEvents IMG3 As System.Web.UI.HtmlControls.HtmlImage Protected WithEvents IMG1 As System.Web.UI.HtmlControls.HtmlImage Protected WithEvents Label1 As System.Web.UI.WebControls.Label 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here 'Insert the code here to display the date and time. Label1.Text = "QueryString Parameters:" & _ "
CatID = " & Request.QueryString("CatID") & _ "
selItem = " & Request.QueryString("selItem") & _ "
Show = " & Request.QueryString("show") Dim CS As String = ConfigurationSettings.AppSettings("CS") Dim SqlConnection1 As New SqlConnection(CS) SqlConnection1.Open() Dim objCM1 As SqlCommand objCM1 = New SqlCommand("SELECT * FROM Categories", SqlConnection1) objCM1.CommandType = CommandType.Text Dim objDR1 As SqlDataReader objDR1 = objCM1.ExecuteReader(CommandBehavior.CloseConnection) MyCatList.DataSource = objDR1 MyCatList.DataBind() End Sub End Class