> asp.net-code and html code (spaghetti)
This is what we had with asp. Asp.net is designed to get rid of all that
spaghetti. The datagrid that Kashypa refered turns record sets into HTML
tables. All you have to do is a little ado.net setup and bind the data to
the datagrid. Look through the asp.net samples that ship with the .net sdk
for examples of binding to the datagrid and other controls.
Code behind allows you to move all your programming code into a seperate
file. Server controls allow you to wrap functionality into a resuable
component, like a shopping cart. There are lots of maginzines (eg. MSDN
Magizine) that are packed with tons of asp.net examples. Jeff Prossie's
"Programming .Net" book is a good introduction to .dotnet and asp.net.
ccallen
"mca" <m_*******@hotmail-dot-com.no-spam.invalid> wrote in message
news:40**********@127.0.0.1...
Hi everyone,
I'm new to asp.net and i have a question about separating the html
code from the programming code.
i have an unknown numbers of entries in my table. I want to make a
hyperlink for every entry in my table. So i query the database and
get for example 3 entries back. So in a while loop i can make 3
hyperlinks with response.write(.......) etc.
For what i know of asp.net, it should be possible to query my database
in the upper side of the aspx-file (logic) and put the hyperlinks at
the bottom of the page (html). Could this be separated or do i have
to mix asp.net-code and html code (spaghetti)?
Anyone?
Regards,
Michel