writing HTML....how?

Discussion in 'ASP .Net' started by =?Utf-8?B?dHpha2U=?=, Jan 30, 2005.

  1. Dear Helper,
    I would like to write some text retrieved from a database of a web form.
    However, if this text contains links to web sites or e-mail addresses I would
    like to render them as Hyperlinks. More than that, I would like to write that
    certain text somewhere, let's say inside a table's cell.
    Now, I have tried Response.Write() , and it works great except the text
    appears at the beginning of the page. (do i have to generate the whole page
    myself?..can't i just insert some HTML?)
    Another thing I tried was inserting the text(already formatted to support
    the hyperlinks "<a href... />") into a textbox but then the controls are not
    renderd as Hyperlinks, just plain text.
    So, can anybody help me with this?
    Thank you!
    =?Utf-8?B?dHpha2U=?=, Jan 30, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?dHpha2U=?=

    DalePres Guest

    You can create a PlaceHolder object, then create a HtmlTable control,
    populate the HtmlTable with your data in a for or while loop, and then use
    the Controls.Add method of your PlaceHolder to put the table where you want
    it.

    I would suggest though, that you investigate the DataList, DataGrid, and
    Repeater controls. You can create a custom control by inheriting any of
    those controls, or you can just handle the ItemDataBound event for any of
    these controls and format the data item to display how you want it.

    You may want to look up those keywords in the MSDN library as a starting
    point.

    Good luck,

    DalePres
    MCAD, MCSE, MCDBA


    "tzake" <> wrote in message
    news:...
    > Dear Helper,
    > I would like to write some text retrieved from a database of a web form.
    > However, if this text contains links to web sites or e-mail addresses I
    > would
    > like to render them as Hyperlinks. More than that, I would like to write
    > that
    > certain text somewhere, let's say inside a table's cell.
    > Now, I have tried Response.Write() , and it works great except the text
    > appears at the beginning of the page. (do i have to generate the whole
    > page
    > myself?..can't i just insert some HTML?)
    > Another thing I tried was inserting the text(already formatted to support
    > the hyperlinks "<a href... />") into a textbox but then the controls are
    > not
    > renderd as Hyperlinks, just plain text.
    > So, can anybody help me with this?
    > Thank you!
    DalePres, Jan 31, 2005
    #2
    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. Avi

    writing html (client) on aspx

    Avi, May 5, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    578
  2. Mark

    Re: writing HTML directly

    Mark, Jul 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    388
  3. Marc Hoeppner

    Re: Writing HTML Page

    Marc Hoeppner, Jul 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    354
    Charles Rumbold
    Jul 22, 2003
  4. HNguyen
    Replies:
    4
    Views:
    2,387
    HNguyen
    Dec 21, 2004
  5. Adam Akhtar
    Replies:
    9
    Views:
    508
    Florian Gilcher
    Aug 16, 2008
Loading...

Share This Page