Good Morning,
I'm really new at .net, and programming in general. So I need some guidance to anyone that is willing to help me out
I'm trying to create "dynamic URL's", at least thats what I call them heh.
Below is my aspx code
VB Code:<formid="Form1"Runat="Server">
<P></P>
<asp:HyperLinkColumnText='Links'
DataNavigateUrlField="NavigationID"
DataNavigateUrlFormatString="search.aspx?catid={0}"
HeaderText="Tier Links"/>
<br/>
<br/>
</form>
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Web.UI.WebControls.HyperLinkColumn
PartialClass guides
Inherits System.Web.UI.Page
Dim objConn As SqlConnection
Dim objCmd As SqlCommand
Dim strSql AsString
'Dim CatTitle As String = Request.QueryString("CatTitle")
Dim CatTitle AsString = Request.QueryString("CatTitleid")
Sub Page_Load(ByVal sender AsObject, ByVal e As EventArgs)
objConn = New SqlConnection(ConfigurationManager.ConnectionStrings("ConnString").ConnectionString)
objConn.Open()
'strSql = "SELECT [CatTitle] FROM [Category] VALUES (@CatTitle)"
strSql = "SELECT [CatTitle] FROM [Category] where CatTitle = " & CatTitle Or strSql = "SELECT [CatTitle] FROM [Category] where CatTitle = (@CatTitleid)"
objCmd = New SqlCommand(strSql, objConn)
objCmd.ExecuteNonQuery()
objConn.Close()
EndSub
EndClass
Any ideas would be greatly appreciated.





Bookmarks