问题描述:

I'm a C# n00b, but I've worked with several other languages. My task is to "convert" an Access database to C# for Intranet use, so I guess I should say this is C#/ASP or however it's commonly referred to.

One of my forms is a continuous form. In Access, a continuous form lets you place controls once on your form, and those controls get repeated for every record in your dataset. This allows you to have, say, a checkbox control linked to a Yes/No field, and that checkbox will appear for every record you display on the form.

I don't even know if this can be done, but probably 90% of what I've written so far came from suggestions/samples I found on this site so I figure this is the place to ask.

So, is there an equivalent of a Continuous Form in C#? Any help is appreciated.

网友答案:

It sounds like you could use the Repeater control. I would look at getting your data from the Entity Framework.

The Repeater Web server control is a data-bound container control that produces a list of individual items. You define the layout of individual items on a Web page using templates. When the page is run, the control repeats the layout for each item in the data source. You must complete several steps to add a Repeater Web server control to a Web forms page. The following procedure describes the minimum that you must do to create a working Repeater control.

网友答案:

I Googled what "Continuous form" is and I don't know why you would have to treat it differently from normal form. Please give us more details about your expected outcome from the project so we can give you better answers..

Entity framework might be an option. You can use it with ASP.NET Pattern and there are lot of examples out there for you. This should get you started

相关阅读:
Top