473,406 Members | 2,404 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,406 software developers and data experts.

? Place the contents of a database field on a page w/o being in a grid, view, etc

ASP.NET 3.5 C#
I very simply want to place the contents of a database field anywhere on a page without adding a bulky gridview, listview, formview, etc on a page? Is this possible? With classic asp you could just do this...
Expand|Select|Wrap|Line Numbers
  1. <%=(recordsetname.Fields.Item("databasefield").Value)%>
Jul 29 '08 #1
3 957
Curtis Rutland
3,256 Expert 2GB
Well, what I like to do is use a Label, and then use my codebehind to select data and then assign said data to the Label's text.

If you don't know how to use a database in your .NET program codebehind, we have two articles in the Howtos section that you should read.

Once you understand the concepts in those articles, you can easily apply data from a database to Label, Literal and TextBox controls (as well as many others.)
Jul 29 '08 #2
Well, what I like to do is use a Label, and then use my codebehind to select data and then assign said data to the Label's text.

If you don't know how to use a database in your .NET program codebehind, we have two articles in the Howtos section that you should read.

Once you understand the concepts in those articles, you can easily apply data from a database to Label, Literal and TextBox controls (as well as many others.)
Can you provide the link to the two articles? I've alwayed used the sqldatasource control to select data and use on a page. I've never selected data in code to use on a page - only accessed data in code to update or delete.
Aug 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Andrew Banks | last post by:
I have been provided with a DSN, user name and password for one of my clients sites. I'm not an ASP developer and need to view all the contents of this database. I usually work in PHP but only...
6
by: Al Wilkerson | last post by:
Hi, Does anyone know how to display the contents of a DataGrid on another aspx page. I have a aspx page that when the user clicks on a link button the database is queried and I want the results...
13
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value....
1
by: Beowulf | last post by:
I have a report laid out in Design View as shown at the end of this message. I have code that performs the following steps: 1. In main report's Report_Open(), DELETE any old rows in tblTOC for...
3
by: idletask | last post by:
I have an application that has many windows. One window is used for order processing. I would like this window to display the other users who are also performing order processing (the idea is to...
5
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
7
by: Arne Beruldsen | last post by:
in vbnet2005 I have a datagridview. When the user clicks on a row...I would like the contents of certain cells to populate a textbox. To do this...i need to be able to refer to the row and...
1
by: Martin.Coetsee | last post by:
Fellow developers, I need to find out how to display one of the fields listed in my gridview as a hyperlink. The field displays the physical file path of for example a pdf file. I want my users to...
10
by: gagonm | last post by:
Hi I m looking for some sample example (Code) for my following scenario I have a Grid View which populates data from database say from Product Tables using dataset and dataadapter This...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.