473,406 Members | 2,843 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.

In Classic ASP it looked like...

In classic asp you can get at data from a db like this:

I am <%=rs("height")%> feet tall

How can this be accomplished in ASP.NET? What does the ADO.NET need to look
like? Can it be done without "binding" to a datagrid, etc.?

Thanks

Andy
Nov 18 '05 #1
3 968
quick 'n dirty way would be to have

I am <asp:label id="txtHeight"></asp:label> feet tall
in the aspx file

and do something like
txtHeight.text = DS["Height"].toString();
in the codebehind.

cannot use the <% %> tags as much as you did in classic asp. it's good and
bad. Webclasses caused MAJOR overhead when rescanning proposed output when
the pages got big, asp.net suffers a penalty too but not as bad.

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:eU*********************@twister.southeast.rr. com...
In classic asp you can get at data from a db like this:

I am <%=rs("height")%> feet tall

How can this be accomplished in ASP.NET? What does the ADO.NET need to look like? Can it be done without "binding" to a datagrid, etc.?

Thanks

Andy

Nov 18 '05 #2
There are no good shortcuts, Andy. You need to study up on the
object-oriented programming model of ASP.Net, which work in a much different
way than the procedural Classic ASP programming model. While it is painful
in the short run to understand, at some point it "clicks" and all falls into
place. At that point, you'll never want to touch Classic ASP again. The .Net
SDK is a free download from:

http://www.microsoft.com/downloads/d...displaylang=en

It has numerous tutorials, articles, and sample code, as well as an awesome
reference of the entire .Net Common Language Runtime library (CLR).

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Andy Sutorius" <an**@sutorius.com> wrote in message
news:eU*********************@twister.southeast.rr. com...
In classic asp you can get at data from a db like this:

I am <%=rs("height")%> feet tall

How can this be accomplished in ASP.NET? What does the ADO.NET need to look like? Can it be done without "binding" to a datagrid, etc.?

Thanks

Andy

Nov 18 '05 #3
The end result looks like this in the code behind:

conNewConn.open()
cmdGetMaxJuri = New OleDbCommand("select max(juri)+1 As
newjuri from juri", conNewConn)
lblMaxJuri.Text = cmdGetMaxJuri.ExecuteScalar()
conNewConn.close()

The end result looks like this in the presentation:

<asp:Label id="lblMaxJuri" runat="server"></asp:Label>
"Andy Sutorius" <an**@sutorius.com> wrote in message news:<eU*********************@twister.southeast.rr .com>...
In classic asp you can get at data from a db like this:

I am <%=rs("height")%> feet tall

How can this be accomplished in ASP.NET? What does the ADO.NET need to look
like? Can it be done without "binding" to a datagrid, etc.?

Thanks

Andy

Nov 18 '05 #4

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

Similar topics

1
by: A Ratcliffe | last post by:
Hopefully just a couple of quick quick questions/responses, but its not something I've generally had trouble with in the past. Unfortunately, I need answers ASAP if anyone is available to help. ...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
19
by: Adam Short | last post by:
I am trying to write a routine that will connect a .NET server with a classic ASP server. I know the following code doesn't work! The data is being returned as a dataset, however ASP does not...
2
by: Tony Meier | last post by:
I am using the WebBrowser control (Explorer.Shell.2) from within a VBA application, embedded on an MS Access form to display the contents of a local folder. By default on Windows 2000/XP the...
3
by: James | last post by:
I need to create a C# web service that returns a recordset for an ASP classic applicaiton to consume. My problem is that so far the only thing that I have found I can return is a dataset using...
28
by: Jim Hubbard | last post by:
I've noticed (for quite some time now) that .Net UIs are not as responsive (see Franklin Covey's PlanPlus for Windows XP or Symantec's .Net Norton Antivirus or even the .Net version of Paint done...
9
by: Charles Law | last post by:
Hi chaps I realise that this is a .NET group, but please don't shoot me down quite yet. I looked in the vb classic groups and there seems to be so little activity there that I was not hopeful of...
15
by: erik.oosterwaal | last post by:
Hi All, I have been developing websites in classic asp using VB script for a long while now. Due to the fact that I also took a detour to developing ColdFusion, and the fact the companies I...
11
by: Jan T. | last post by:
I wonder if anybody know a web site that has a good tutorial on this subject. What I want to do, is make a log in Page, and make sure that all my pages is validating that the user is loged in...
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:
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.