Custom html output with custom server control

D

DKode

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
 
S

S.M. Altaf [MVP]

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
 
D

DKode

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
 
S

S.M. Altaf [MVP]

I am not aware of the existence of any such feature or control. I believe
you'll have to do this yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top