By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,639 Members | 2,340 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,639 IT Pros & Developers. It's quick & easy.

Help: how to do equivalent of Java Beans in ASP.NET

P: n/a
To those familiar with Java beans, question on how to do with ASP.NET:

I come from J2EE and starting to learn ASP.NET and C#.
I want to find a way to display a web form filled with data taken from a SQL
table. I need to repeat the layout of my web form in one single page, each
time with data taken from the SQL table row. I don't want to put those data
rows into a datagrid because I have my own form that I want to populate with
a specific html layout. And I'm not sure the "Repeater" control is a solution
to my problem.

With J2EE, I would have the use of Java Beans where I would loop and store
each table row information into a class bean and then add each bean into an
ArrayList. Then I would pass this ArrayList to my .JSP page (the equivalent
of .aspx) where I would iterate through my ArrayList to get each bean's
methods using a java scriplet tag to put my "for" loop.

How can i do the equivalent of Java beans in ASP.NET? Can someone give me a
sample codes of the .aspx.cs file and .aspx file showing how you can repeat a
web form and populating with information taken from each table row?
I think I am able to store data rows into my respective "asp.net bean"
inside my .aspx.cs file, but I don't know what to do with it in order to
display it out on the .aspx file. I'm not even sure if it's possible to use
<%# %> scriplets in asp.net like I use with .JSP

If there's other easier way with ASP.NET, please let me know.

Thanks a bunch.
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.