473,394 Members | 1,718 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.

Custom html output with custom server control

I have developed a custom server control that displays a login page
that authenticates against AD. The server control works fine, but now I
am trying to figure out the best way to output custom html. The HTML
output for the server control changes for each application I include
the server control in. At first I thought about making an html file and
just including it, but this won't work because with the custom html I
output two textboxes and a submit button that is generated through code
so I can fire the events for the controls.

What is the easiest way to include custom html output so I don't have
to re-code my custom server control everytime I add it to a different
application. Any help would be appreciated.

thanks

Sean

Nov 19 '05 #1
4 1769

Hi,

I'm thinking, something in the lines of a template with string-placeholders.
The template would be nothing but a text file with HTML in it, and strings
that your code can look for, like $puttextboxhere. You can parse through,
replace, and write the elements out.

Catch my drift?

-Altaf

--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"DKode" <dk****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I have developed a custom server control that displays a login page
that authenticates against AD. The server control works fine, but now I
am trying to figure out the best way to output custom html. The HTML
output for the server control changes for each application I include
the server control in. At first I thought about making an html file and
just including it, but this won't work because with the custom html I
output two textboxes and a submit button that is generated through code
so I can fire the events for the controls.

What is the easiest way to include custom html output so I don't have
to re-code my custom server control everytime I add it to a different
application. Any help would be appreciated.

thanks

Sean

Nov 19 '05 #2
I see what your're saying. Is there any built in template feature of
dotnet that can do this? Or should I just parse the file and output it
myself.

thanks

Nov 19 '05 #3
I am not aware of the existence of any such feature or control. I believe
you'll have to do this yourself.
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com

"DKode" <dk****@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I see what your're saying. Is there any built in template feature of
dotnet that can do this? Or should I just parse the file and output it
myself.

thanks

Nov 19 '05 #4
I used your suggested method and it works perfectly.

thanks for your help!

Sean

Nov 19 '05 #5

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

Similar topics

3
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1...
2
by: Hawk | last post by:
I have a custom menu control that I am creating using C#. I am rendering HTML from a StringBuilder in my control to add the needed JavaScript to the HTML output. I need to have the JavaScript...
2
by: Troy | last post by:
I have been trying for 2 weeks to figure out how to implement a table as a member variable that the user can setup with the property designer with no luck. The code below adds the table to the...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
1
by: Thomas Jespersen | last post by:
Hello How do I databind a ASP.NET Texbox to a custom object. I a WinForm I do it like this: Dim myCustomerObject As Customer() Private Sub CreateNewCustomer myCustomerObject = New...
2
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid...
3
by: Dennis M | last post by:
Hey everyone, I am curious what the performance impact of a custom control would be if it had a significant hierarchy of children. For example, 40 child controls, 5 levels deep, each control on...
21
by: One Handed Man \( OHM - Terry Burns \) | last post by:
When using a custom control. In order to check and see if values have changed one has to implement the IPostBackDataCollection interface. The values returned for the control seem to be simply a...
5
by: John Kotuby | last post by:
Hi all, This is my first time trying to creaet and use a custome Web Control in a Web Site project in ASP.NET 2.0 with VS 2005 and VB. I created the control in a separate Web Control Library...
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...
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
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
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.