Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2007, 05:48 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I didn't mean to hit you hard; I just wanted to give you advice about getting the most out of .NET.

Anyway, you can use a DetailsView or a FormView control for this; both are meant to display a single record at the time (although they support paging as well.

http://quickstarts.asp.net/QuickStar...tailsview.aspx
http://quickstarts.asp.net/QuickStar.../formview.aspx

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Rustug by Opgezwolle (Track 11 from the album: Vloeistof) What's This?
 
Old January 10th, 2007, 05:51 PM
Authorized User
 
Join Date: Jan 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know i diden't mean to hit me hard ;) just a joke.

do i need
<asp:AccessDataSource runat="server"></asp:AccessDataSource>
or
<asp:ObjectDataSource runat="server"></asp:ObjectDataSource>
fore my Access database !?

 
Old January 10th, 2007, 05:59 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The ObjectDataSource works with .NET objects only; you need classes in your App_Code folder, Bin folder, or standard .NET classes for this control to work.

The AccessDataSource control is for quick access to an Access database, although you could also use the SqlDataSource control.

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Vork by Opgezwolle (Track 12 from the album: Vloeistof) What's This?
 
Old January 10th, 2007, 06:07 PM
Authorized User
 
Join Date: Jan 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay so i can still use this from my web.config
<appSettings>
    <add key="ConnStr" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/WEB/webdesign/net/site/App_Data/DSNbase.mdb" />
</appSettings>

and then i can use something like:
<asp:Content ID="Main" ContentPlaceHolderID="ContentPlaceHolderMain" Runat="Server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnStr %>"
    SelectCommand="SELECT [MainID], [MainText] FROM [MainText] WHERE ([MainID] = @MainID)">
</asp:SqlDataSource>
    <asp:FormView ID="FormView1" runat="server" DataSource="SqlDataSource1">
    </asp:FormView>
</asp:Content>

or it that wrong !?
 
Old January 10th, 2007, 06:12 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Why don't you try it out and see if it works?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: I'm Not Okay (I Promise) by My Chemical Romance (Track 5 from the album: Three Cheers For Sweet Revenge) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Export Data from xl to database show error. venkateswararaochaganti ASP.NET 2.0 Basics 0 November 3rd, 2008 04:37 AM
Show Foxpro Database in ASP Slayer_CauTioN Classic ASP Databases 1 July 20th, 2008 07:28 PM
The DataGrid does not show data sams ASP.NET 1.0 and 1.1 Professional 16 June 20th, 2007 07:19 AM
Help to show Data. mistry_bhavin General .NET 1 July 25th, 2004 08:19 AM
Show Images from Database morpheus Classic ASP Basics 12 December 16th, 2003 04:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.