473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

HTML Data generated by Server.Controls

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
2 986
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sushi | last post by:
Hello, I am developing an asp.net website. I have a web fomr say' webform1.aspx' having two input button html controls. When I click on 'button1' a message appears. Following code is executed o...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
7
by: Kersh | last post by:
I'm trying to implement XHTML standards in my ASP.NET web pages but whenever I use web controls I get problems because of the very strict nature of W3C XHTML (transitional version is picky but...
4
by: clintonG | last post by:
Technically speaking, this issue is not about modifying the HTML generated by server controls but preceding the HTML generated by server controls with an HTML control generated on the basis of the...
5
by: Brian Kitt | last post by:
I have a C# application that builds dynamic HTML and renders it. Because it is rendered in this way, the input controls are not server controls. I write the entire page, which has a variable...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
2
by: Giedrius | last post by:
hi, i have an idea to make admin tool on home computer, that would generate html files using some kind of templates and database data and put these generated html files to public web server, witch...
2
by: Lucky | last post by:
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...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.