Re: Newbie Question!
- From: "Israel Richner" <israel.richner@xxxxxxxxx>
- Date: 24 Oct 2006 14:41:28 -0700
I have to build the table dynamically because the number of records are
unknown. So I won't know how many controls I need until the reader is
finished.
How would I accomplish this?
Thanks for the reply!
Izzy
Jesse Liberty wrote:
First, while you can do what you are suggesting, you typically would place
an asp control into the table cell, and then you would write your data to
the text field or to an another appropriate property of that control. For
example, you might write
"<table><tr><td><asp:label id="mylabel" runat="server"></td></tr></table>"
then in your code you can write
mylabel.Text = myTable.Row[0]["NameColumn"];
but all of this is assuming quite a bit about asp.net controls and adolnet
controls and quite a bit more. I strongly recommend that you find a book
that takes you through asp.net in a bit more orderly fashion so that it
doesn't all seem like such a muddle. :-)
There are quite a few out there (I happen to like the O'Reilly book
Programming ASP.NET 2nd Edition, but I know the author). Go to a good book
store and read through a couple; it will be time and money well spent. Find
one that meets your style and needs and that tells the story step by step
but that focuses on the issues you care about.
Best of luck.
-j
--
Jesse Liberty
Microsoft MVP
Author/ Programmer
http://www.LibertyAssociates.com
"Israel Richner" <israel.richner@xxxxxxxxx> wrote in message
news:1161724463.612491.217070@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
How do I write information to a specific location on a web page from
the code behind page?
For instance I have 2 controls on my web form, in the code behind page
I query a database and read the results with a data reader. While
reading the records I format it into an html string like
"<table><tr><td>[inserted reader data]</td></tr></table>"
I know I can use Response.Write(string) but how do I control where that
new table gets written too? I want it placed between the two controls
on the form.
What am I missing?
Izzy
.
- Follow-Ups:
- Re: Newbie Question!
- From: John Timney \(MVP\)
- Re: Newbie Question!
- From: sloan
- Re: Newbie Question!
- References:
- Newbie Question!
- From: Israel Richner
- Re: Newbie Question!
- From: Jesse Liberty
- Newbie Question!
- Prev by Date: DataSet's GetChanges() w/ a webapp working in disconnected mode
- Next by Date: Re: Preventing Request.Form abuse
- Previous by thread: Re: Newbie Question!
- Next by thread: Re: Newbie Question!
- Index(es):
Relevant Pages
|