Re: Create a <table> of <textarea>s
From: ASP Yaboh (ASPYaboh_at_discussions.microsoft.com)
Date: 09/10/04
- Next message: Curt_C [MVP]: "Re: Default Command Button"
- Previous message: Angel: "Default Command Button"
- In reply to: Lateralus [MCAD]: "Re: Create a <table> of <textarea>s"
- Next in thread: Lateralus [MCAD]: "Re: Create a <table> of <textarea>s"
- Reply: Lateralus [MCAD]: "Re: Create a <table> of <textarea>s"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 10 Sep 2004 09:13:07 -0700
The main reason is because I'm not familiar with Microsoft programming
languages and Visual Studio. I've been working in Java, Delphi and Pascal and
a completely different architecture for some years. C# is no problem but I
find ASP.Net to be a completely different beast.
"Lateralus [MCAD]" wrote:
> Is there any reason why you just don't expose the DataSet/DataView from the
> business object. As far as how to bind it, all you have to do is set the
> datasource in the code behind to your DataSet/DataView/ArrayList and call
> DataBind();
>
> protected System.Web.UI.WebControls.Repeater myRepeater;
>
> private void Page_Load(object sender, System.EventArgs e)
> {
> //your code to load your business object
>
> this.myRepeater.DataSource = put your array list object here;
> this.myRepeater.DataBind();
> }
>
> --
> Lateralus [MCAD]
>
>
> "ASP Yaboh" <ASPYaboh@discussions.microsoft.com> wrote in message
> news:FC77A764-B5AD-4A48-91E0-CB74861AD754@microsoft.com...
> >I have one more question: How do I get to the data in the ArrayList?
> >
> > What I have is an ArrayList (parent), where each field is another
> > ArrayList
> > (children). Each child holds a row returned from a recordset. The class
> > object has methods where an index (int), is passed in and the
> > corresponding
> > child data returned. For example, say each row contains a comment id,
> > comment
> > text and response text. Calling ".getComment(index)" where index = 5,
> > returns
> > the comment text from the fifth ArrayList or row.
> >
> > Most of the examples I have found show Repeater with and XML file.
> > ArrayList
> > examples show the ArrayList as part of the .aspx file.
> >
> >
> >
> > "Lateralus [MCAD]" wrote:
> >
> >> No problem. Glad to help.
> >>
> >> --
> >> Lateralus [MCAD]
> >>
> >>
> >> "ASP Yaboh" <ASPYaboh@discussions.microsoft.com> wrote in message
> >> news:66433F12-CCCE-4ABB-89EF-6ADA68D61087@microsoft.com...
> >> >I found by exposing the ArrayList(s) from the middle-tier objects, the
> >> >aspx
> >> > page can bind the Repeater to it.
> >> >
> >> > Thank you for your help.
> >> >
> >> > "Lateralus [MCAD]" wrote:
> >> >
> >> >> 1.) A Datagrid is a little simpler to use because it is basically a
> >> >> single
> >> >> table, with a row for every row in the list. A repeater is when you
> >> >> need
> >> >> to
> >> >> customize the html a bit more. It sounds like you want a <table> for
> >> >> every
> >> >> row in the array list. So it sounds like a repeater would suit you
> >> >> better.
> >> >>
> >> >> 2.) I usually bind by repeaters/grids to a DataView. The DataSource
> >> >> can
> >> >> be
> >> >> any System.Collections.IEnumerable derived object such as a
> >> >> System.Data.DataView for accessing databases, an
> >> >> System.Collections.ArrayList, a System.Collections.Hashtable, or an
> >> >> array.
> >> >>
> >> >> HTH
> >> >>
> >> >> --
> >> >> Lateralus [MCAD]
> >> >>
> >> >>
> >> >> "ASP Yaboh" <ASPYaboh@discussions.microsoft.com> wrote in message
> >> >> news:88FC5201-B050-4954-80C9-0E4D2631212D@microsoft.com...
> >> >> > Two questions on that:
> >> >> >
> >> >> > 1. Do I need to use the DataGrid with the Repeater?
> >> >> >
> >> >> > 2. Binding to the data leaves me a little confused. The database is
> >> >> > on
> >> >> > another tier and is only accessible through separate business
> >> >> > objects.
> >> >> > These
> >> >> > objects then expose the data where they might be held e.g. in
> >> >> > ArrayLists.
> >> >> > I
> >> >> > can not create a connection from the .aspx page directly to a
> >> >> > database
> >> >> > connection. Can I bind to other "objects"?
> >> >> >
> >> >> > Again, thank you for your time.
> >> >> >
> >> >> > "Lateralus [MCAD]" wrote:
> >> >> >
> >> >> >> I think you'll find that using Repeaters/DataGrids are much cleaner
> >> >> >> and
> >> >> >> simpler than looping through the code manually. Plus it has better
> >> >> >> performance.
> >> >> >>
> >> >> >> --
> >> >> >> Lateralus [MCAD]
> >> >> >>
> >> >> >>
> >> >> >> "Lateralus [MCAD]" <dnorm252_at_yahoo.com> wrote in message
> >> >> >> news:OGHzcUqlEHA.3016@tk2msftngp13.phx.gbl...
> >> >> >> > Have you looked into using a repeater control?
> >> >> >> >
> >> >> >> > --
> >> >> >> > Lateralus [MCAD]
> >> >> >> >
> >> >> >> >
> >> >> >> > "ASP Yaboh" <ASPYaboh@discussions.microsoft.com> wrote in message
> >> >> >> > news:800C39BE-C1DE-4544-972A-CE85B1FF46EC@microsoft.com...
> >> >> >> >>I have an ArrayList of data gathered from a database. I want to
> >> >> >> >>create
> >> >> >> >>a
> >> >> >> >>web
> >> >> >> >> page from this data by creating a <table>, each cell in each row
> >> >> >> >> displays
> >> >> >> >> the
> >> >> >> >> appropriate data. One of those cells in each row needs a
> >> >> >> >> <textarea>
> >> >> >> >> control.
> >> >> >> >>
> >> >> >> >> The background supporting classes are completed, the only task
> >> >> >> >> left
> >> >> >> >> now
> >> >> >> >> is
> >> >> >> >> to create the web page. I am at a loss on how to create the
> >> >> >> >> table
> >> >> >> >> in
> >> >> >> >> the
> >> >> >> >> page
> >> >> >> >> populated by the data. Previously, I would have just iterated
> >> >> >> >> through
> >> >> >> >> the
> >> >> >> >> data placing the data in the cells on the HTML page by <%= %>.
> >> >> >> >>
> >> >> >> >> Any help would be appreciated.
> >> >> >> >> Thank you.
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
- Next message: Curt_C [MVP]: "Re: Default Command Button"
- Previous message: Angel: "Default Command Button"
- In reply to: Lateralus [MCAD]: "Re: Create a <table> of <textarea>s"
- Next in thread: Lateralus [MCAD]: "Re: Create a <table> of <textarea>s"
- Reply: Lateralus [MCAD]: "Re: Create a <table> of <textarea>s"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|