473,394 Members | 1,737 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,394 software developers and data experts.

rendering HTMLTable control containing ASP .Net form elements into string

I am trying to get a string that contains the HTML code generated for a
table control, Need help, examples about how to use render method and
string builder, Thanks !!!

Oct 6 '06 #1
1 4142
Where you trying to render this html code ?

Assume you have Web User control there you want to render html control,

override your render method in your Usercontrol and , that even handler will
giver you Htmlwriter as one of the param

use writer.writeline(yourHtmlTablestring);

Note: If you want to create html control define all the heml basic elements
as string

like below

string lblHtml = "<TD nowrap><font size=2 face=Verdana>{0}</font></TD>";
string txtBoxHtml = "<TD nowrap><INPUT id={0} type=text name={0} value={1}
disabled class=input></TD>";

and use string .format method to substitue the value

writer.WriteLine(string.Format(lblHtml,name));

writer.WriteLine(string.Format(txtBoxHtml,"txtBox" +name,val));

Thanks
Baski

"Aur_Ros" <au*****@hotmail.comwrote in message
news:11**********************@e3g2000cwe.googlegro ups.com...
>I am trying to get a string that contains the HTML code generated for a
table control, Need help, examples about how to use render method and
string builder, Thanks !!!

Oct 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ajay Desh | last post by:
Hi I am gettin error, if i try to find the top position of a table. Here is what i am doing.I have a HtmlTable (Table3 is the name/id) created.It has a position and a Top and Left co-ordinates...
2
by: Raed Sawalha | last post by:
Hi, This is probably pretty simple but... I am dynamically adding rows to a HtmlTable that contain Textbox controls. (There may be more than one server control/textbox in a given cell) How...
1
by: Leo | last post by:
I created a user control which is some text contained in a HtmlTable. I put this control into main form. I would like to have the ability to move this control around in the main form. I think one...
1
by: TRobran | last post by:
What I'm trying to do seems pretty straightforward so I must be missing something simple. Any help is greatly appreciated. On my page I have a DropDownList, a HtmlTable and a Button. Each row...
5
by: Dave A | last post by:
I am writing an ASP.NET tool that will allow the client to create their own online froms. ie the client can add tect boxes, text, drop downs,etc with absolutely no technical skill what so ever....
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
0
by: purnimakarnati | last post by:
Hi All, Can anybody solve my problem. I created a HTMLTable with a dataset by a method called addTable(dataset) After creating a new table and new row I am adding cells and in each cell I am...
2
by: Benton | last post by:
Hi there, I'm creating a custom server control, inheriting from TextBox. It has this AsDateTime property that returns the textbox contents converted to the nullable DateTime data type, as...
2
crabpot8
by: crabpot8 | last post by:
I am working on a message system that will let out programmers easily output a message to any user. It works fine, unless the message is requested inside of a page_load on an aspx page. Then, it does...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.