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

HTML Data generated by Server.Controls

P: n/a
hi guys!
i've got very interesting problem. it is like this.
is it possible to get HTML generated by the server control in code
behind?

i'm developing an asp.net web application where i need to fectch data
in HTML format. The data is rendered by the Data Repeater in Table
format on webpage.

is there any way i can get reder data of data repeater from itself? i
mean is there any method of anyway to get html data from HTML Control?
like GetHTML() or any properties or work around?

i tried with RenderControl() method but i failed.

the HTML Render Data generated by the Data Repeater is this :
<Table>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</tr>
<tr>
<td>Col1</td>
<td>Col2</td>
<td>Col3</td>
</tr>
</Table>

i want this data in code behind.

if anyone know please let me know.

Lucky

Sep 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lucky wrote:
i've got very interesting problem. it is like this.
is it possible to get HTML generated by the server control in code
behind?

i'm developing an asp.net web application where i need to fectch data
in HTML format. The data is rendered by the Data Repeater in Table
format on webpage.

is there any way i can get reder data of data repeater from itself? i
mean is there any method of anyway to get html data from HTML Control?
like GetHTML() or any properties or work around?
You could generate the HTML yourself instead of using a Data Repeater.

Sometimes the ready-made widgets just don't have what you need -
<mini-rant>for example, the asp:image control uses style="..." to set width
and height which is utterly useless to a browser trying to lay out a table
before the image data has been received, so you have to use an asp:label and
build the HTML yourself.<and breathe>

Andrew
Sep 12 '06 #2

P: n/a
Hi,

Well it's not common to start with.

A path would be
First check if there is any event that gives you access to the html being
generated (not sure if it does exist)
If not then you will have to use the stream where all the controls write its
client side code. maybe you can replace it with one of your own. (not sure
if possible)

Finally you could derive your control and override the Render method you
will have easy access to the stream of rendered html
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Lucky" <tu************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
hi guys!
i've got very interesting problem. it is like this.
is it possible to get HTML generated by the server control in code
behind?

i'm developing an asp.net web application where i need to fectch data
in HTML format. The data is rendered by the Data Repeater in Table
format on webpage.

is there any way i can get reder data of data repeater from itself? i
mean is there any method of anyway to get html data from HTML Control?
like GetHTML() or any properties or work around?

i tried with RenderControl() method but i failed.

the HTML Render Data generated by the Data Repeater is this :
<Table>
<tr>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</tr>
<tr>
<td>Col1</td>
<td>Col2</td>
<td>Col3</td>
</tr>
</Table>

i want this data in code behind.

if anyone know please let me know.

Lucky

Sep 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.