473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Creating a custom detail's screen

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!!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Nov 18 '05 #1
3 1254
OK, I reviewed some docs and found that using the <% %> style is not a recommend way, that using server controls are preferred, i.e. the label.

Is this the best way then? Also, like the DataGrid edit option, how difficult would it be to get this to run similiarly?

Thanks,

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:ub****************@TK2MSFTNGP10.phx.gbl...
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!!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Nov 18 '05 #2
What I would do in Code-Behind is grab the id of the user that you want to edit and call a method call GetUser that retrieves the user information from the table in the database and displays the information using asp:TextBox. Allow the user to edit the information and then click an update button and call a method called UpdateUser that sends the data back to the database and updates it.

"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:%2***************@TK2MSFTNGP12.phx.gbl...
OK, I reviewed some docs and found that using the <% %> style is not a recommend way, that using server controls are preferred, i.e. the label.

Is this the best way then? Also, like the DataGrid edit option, how difficult would it be to get this to run similiarly?

Thanks,

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:ub****************@TK2MSFTNGP10.phx.gbl...
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!!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Nov 18 '05 #3
OK, I know how to edit the info correctly, I was hoping I could use the Edit feature built into the DataGrid or whatever is used.

Is it possible to turn a datagrid 90degrees? so have the header values on the left instead at the top?

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
"William Gower" <w_*****@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl...
What I would do in Code-Behind is grab the id of the user that you want to edit and call a method call GetUser that retrieves the user information from the table in the database and displays the information using asp:TextBox. Allow the user to edit the information and then click an update button and call a method called UpdateUser that sends the data back to the database and updates it.

"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:%2***************@TK2MSFTNGP12.phx.gbl...
OK, I reviewed some docs and found that using the <% %> style is not a recommend way, that using server controls are preferred, i.e. the label.

Is this the best way then? Also, like the DataGrid edit option, how difficult would it be to get this to run similiarly?

Thanks,

--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
"David Lozzi" <dlozzi(remove-this)@delphi-ts.com> wrote in message news:ub****************@TK2MSFTNGP10.phx.gbl...
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!!
--
David Lozzi
Web Applications/Network Specialist
Delphi Technology Solutions, Inc.
dlozzi(remove-this)@delphi-ts.com
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Joop | last post by:
Hello everyone, I'm new on this list and have been working for quite a while on a PHP app that will make an HTML frontend for a PostgreSQL dbms. Works fine so far but I'm having a little trouble...
1
by: Duncan Bloem | last post by:
Hello, I am not a stylesheet designer, but I am wondering if (and how) the following XML file can be transformed to a custom defined text output file. from XML file: <?xml version="1.0"...
1
by: Robert Neville | last post by:
I am having some trouble with some old code revolving around custom form navigation buttons. My main form has a sub-form with these custom navigation buttons. In other words, the code should be...
4
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
1
by: Keimo Repo | last post by:
Hello I would need some advice, even just speculations... A customer of ours insists on a couple of customer specific design features for our existing multi-customer web application: - A...
4
by: 2D Rick | last post by:
In Access2003 and XP. My forms detail section hides behind the header when I scroll down to see controls off screen. This is similar to freezing a pane in Excel. I'd rather this did not happen...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
17
by: Lee Harr | last post by:
I understand how to create a property like this: class RC(object): def _set_pwm(self, v): self._pwm01 = v % 256 def _get_pwm(self): return self._pwm01 pwm01 = property(_get_pwm, _set_pwm)
1
by: ramaswamynanda | last post by:
Hello, I have a simple vb.net 2005 application using an SQLserver database There is a form , employees that has a grid view and a detail view control The grid displays data and has a "Select"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.