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. Advertisements

  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. Advertisements

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:
    687
  2. Marc Hoeppner

    Re: Writing HTML Page

    Marc Hoeppner, Jul 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    432
    Charles Rumbold
    Jul 22, 2003
  3. SteveB

    Writing <br> in HTML using C#

    SteveB, Oct 25, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    21,581
    SteveB
    Oct 25, 2004
  4. HNguyen
    Replies:
    4
    Views:
    2,667
    HNguyen
    Dec 21, 2004
  5. Christian Perthen
    Replies:
    1
    Views:
    369
  6. Mike Watson
    Replies:
    2
    Views:
    3,702
    Mike Watson
    Sep 9, 2003
  7. Daniel Bleisteiner

    HTML and right-to-left writing...

    Daniel Bleisteiner, May 26, 2004, in forum: HTML
    Replies:
    10
    Views:
    4,136
    Jukka K. Korpela
    May 30, 2004
  8. Adam Akhtar
    Replies:
    9
    Views:
    834
    Florian Gilcher
    Aug 16, 2008
Loading...