how to create an aspx page?

fguihen

Junior Contributor
Joined
Nov 10, 2003
Messages
248
Location
Eire
ok, from old asp i remember that i if i wanted to put a picture or text from a DB on a page, i put in the <% bracket, put in the code, all html was put in as a string, and written out to the browser. how do i accomplish this in asp.net(using c#)? i have a load of paths to pictures in a database, and i want to use theese to display pictures on a page,(along with text). how do i do this?
 
Are you looking for something like:

Code:
<a href='mailto:<%# DataBinder.Eval(Container.DataItem, "EmailAddress")%>'>
<%# DataBinder.Eval(Container.DataItem, "EmailAddress")%>
</a>
 
fguihen,
asp.netz concept is totally different from the good ole classic ASP. In order to overcome the problem of intertwined presentation and function, MS came out with this style. With ASP.Net you keep ur functional logic away from your presentation logic. So you need to stop comparing ASP.Net with Classic ASP or if you're thinking bout converting things, then forget it totally. Itz possible but for that you don't need .Net!!! :D
 
Back
Top