473,394 Members | 2,063 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.

Embeding html controls in Server Control

Hi Everyone,

I have some HTML snippets (with about 15 HTML controls) that needs to be
embedded into my server control. I need these HTML controls on client side
for some processing (JS).

What is the best way to implement this?

One most straight forward way i can think of is to have something like -
Response.Write("<long HTML string>");

Am not sure if HTC can help, because i only need to pass these html controls
from server to client and nothing more then that.

Thanks,
Raj.
Dec 22 '06 #1
2 1081
Create a server control in a .ascx file and just put the controls in the
..ascx file.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Raj Dhrolia" <ra********@hotmail.comwrote in message
news:uk**************@TK2MSFTNGP02.phx.gbl...
Hi Everyone,

I have some HTML snippets (with about 15 HTML controls) that needs to be
embedded into my server control. I need these HTML controls on client side
for some processing (JS).

What is the best way to implement this?

One most straight forward way i can think of is to have something like -
Response.Write("<long HTML string>");

Am not sure if HTC can help, because i only need to pass these html
controls
from server to client and nothing more then that.

Thanks,
Raj.


Dec 22 '06 #2
You'll probably want to investigate embedding them as WebResources as I've
done with the JavaScript snippets in this example:
http://SteveOrr.net/articles/Flasher.aspx

Here's more info:
http://msdn.microsoft.com/msdnmag/is...asicInstincts/

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Raj Dhrolia" <ra********@hotmail.comwrote in message
news:uk**************@TK2MSFTNGP02.phx.gbl...
Hi Everyone,

I have some HTML snippets (with about 15 HTML controls) that needs to be
embedded into my server control. I need these HTML controls on client side
for some processing (JS).

What is the best way to implement this?

One most straight forward way i can think of is to have something like -
Response.Write("<long HTML string>");

Am not sure if HTC can help, because i only need to pass these html
controls from server to client and nothing more then that.

Thanks,
Raj.

Dec 23 '06 #3

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

Similar topics

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...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.