G
Guest
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.
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.