Custom html output with custom server control

Discussion in 'ASP .Net' started by DKode, Nov 4, 2005.

  1. DKode

    DKode Guest

    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
    DKode, Nov 4, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >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.M. Altaf [MVP], Nov 4, 2005
    #2
    1. Advertising

  3. DKode

    DKode Guest

    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
    DKode, Nov 4, 2005
    #3
  4. 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" <> wrote in message
    news:...
    >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.M. Altaf [MVP], Nov 5, 2005
    #4
  5. DKode

    DKode Guest

    I used your suggested method and it works perfectly.

    thanks for your help!

    Sean
    DKode, Nov 7, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Louden
    Replies:
    1
    Views:
    6,879
    Scott M.
    Oct 11, 2003
  2. =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=

    Help on HTML server control vs HTML control

    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=, Sep 15, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    2,129
    =?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=
    Sep 15, 2005
  3. pratap
    Replies:
    3
    Views:
    442
    James Kanze
    Jul 19, 2007
  4. Matt Sokol
    Replies:
    2
    Views:
    365
    Theo Tillotson
    Aug 7, 2003
  5. Tim
    Replies:
    0
    Views:
    197
Loading...

Share This Page