D
David Lozzi
OK, here's what I want to do. Display a list of items in a datagrid, which works great! When a user clicks on one of the items, they are sent to another page to view its details. Now here is where I am having an issue. I would like to display the data like so
General Info EDIT
Item Name: this and that
Desc2: woo hoo
Price: $3
Detailed Info EDIT
Height: 3
Width: 2
Weight: 5
See what I mean? A DataGrid doesn't appear to be what I want, nethier a DataList. A repeater might do it, but can I have a Header (general) then Item then another Header?
I've tried to connect to SQL, then pull the queried data, which works grand, see below:
Dim myConnection As New SqlConnection(sqlConn)
Dim myCommand As New SqlCommand()
Dim rec as SqlDataReader
myconnection.open()
myCommand.Connection = myConnection
myCommand.CommandText = sqlQry
rec = MyCommand.ExecuteReader()
I have done something like Session("user") = rec("user") and it's worked, but this is within the <script> tags. But it does not work to do the following in HTML
<form runat=server>
Item Name: <%=rec("itemname")%><br>
</form>
I get the following error on that line, BC30451: Name 'rec' is not declared.
I can of course use a label like so:
itemname.text = rec("itemname")
</script>
<html>
.......
<asp:label id="itemname" runat="Server" />
So, what is the best way of completing this task?
THANKS!!
General Info EDIT
Item Name: this and that
Desc2: woo hoo
Price: $3
Detailed Info EDIT
Height: 3
Width: 2
Weight: 5
See what I mean? A DataGrid doesn't appear to be what I want, nethier a DataList. A repeater might do it, but can I have a Header (general) then Item then another Header?
I've tried to connect to SQL, then pull the queried data, which works grand, see below:
Dim myConnection As New SqlConnection(sqlConn)
Dim myCommand As New SqlCommand()
Dim rec as SqlDataReader
myconnection.open()
myCommand.Connection = myConnection
myCommand.CommandText = sqlQry
rec = MyCommand.ExecuteReader()
I have done something like Session("user") = rec("user") and it's worked, but this is within the <script> tags. But it does not work to do the following in HTML
<form runat=server>
Item Name: <%=rec("itemname")%><br>
</form>
I get the following error on that line, BC30451: Name 'rec' is not declared.
I can of course use a label like so:
itemname.text = rec("itemname")
</script>
<html>
.......
<asp:label id="itemname" runat="Server" />
So, what is the best way of completing this task?
THANKS!!