Problem with Build Custom Web Control

Discussion in 'ASP .Net Building Controls' started by Dexter, Nov 26, 2004.

  1. Dexter

    Dexter Guest

    Hello all,
    I'm building a web custom control, but i hava a problem.
    In the Sub Render, i have a html code as output. All ok.

    I have a other class that has a function that return a image object,
    and i need to insert this image in my html of output, but it
    don't has a path.

    Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
    dim saida as string
    saida = "<table>"
    saida += "<img src="">" --> ???????? What i do here to show the returned
    image of my Function.
    saida += "</table>"
    End Sub

    Somebody can help me in this task?
    Thanks

    Dexter
    Dexter, Nov 26, 2004
    #1
    1. Advertising

  2. Take a look at my blog entry. It explains how this is done..

    http://www.criticlsites.com/naveen

    Naveen Kohli
    http://www.netomatix.com
    http://www.criitcalsites.com/naveen

    "Dexter" <> wrote in message
    news:...
    > Hello all,
    > I'm building a web custom control, but i hava a problem.
    > In the Sub Render, i have a html code as output. All ok.
    >
    > I have a other class that has a function that return a image object,
    > and i need to insert this image in my html of output, but it
    > don't has a path.
    >
    > Protected Overrides Sub Render(ByVal output As
    > System.Web.UI.HtmlTextWriter)
    > dim saida as string
    > saida = "<table>"
    > saida += "<img src="">" --> ???????? What i do here to show the
    > returned image of my Function.
    > saida += "</table>"
    > End Sub
    >
    > Somebody can help me in this task?
    > Thanks
    >
    > Dexter
    >
    Naveen K Kohli, Nov 26, 2004
    #2
    1. Advertising

  3. Oops...
    It should be..

    http://www.criticalsites.com/naveen

    "Leon Friesema" <leon@@frostbits.nl> wrote in message
    news:...
    > On Fri, 26 Nov 2004 11:52:17 -0500, "Naveen K Kohli"
    > <> wrote:
    >
    >>Take a look at my blog entry. It explains how this is done..
    >>
    >>http://www.criticlsites.com/naveen
    >>
    >>Naveen Kohli
    >>http://www.netomatix.com
    >>http://www.criitcalsites.com/naveen
    >>
    >>"Dexter" <> wrote in message
    >>news:...
    >>> Hello all,
    >>> I'm building a web custom control, but i hava a problem.
    >>> In the Sub Render, i have a html code as output. All ok.
    >>>
    >>> I have a other class that has a function that return a image object,
    >>> and i need to insert this image in my html of output, but it
    >>> don't has a path.
    >>>
    >>> Protected Overrides Sub Render(ByVal output As
    >>> System.Web.UI.HtmlTextWriter)
    >>> dim saida as string
    >>> saida = "<table>"
    >>> saida += "<img src="">" --> ???????? What i do here to show the
    >>> returned image of my Function.
    >>> saida += "</table>"
    >>> End Sub
    >>>
    >>> Somebody can help me in this task?
    >>> Thanks
    >>>
    >>> Dexter
    >>>

    >>

    >
    >
    > DNS error
    Naveen K Kohli, Nov 26, 2004
    #3
  4. A best practice is use a Relative Path to the image..
    You control could have a ImagePath Property...
    --
    Saludos,
    Eugenio Serrano
    NDSoft Consultoria y Desarrollo
    MS MVP ASP.Net
    Voluntario Ineta Latam (www.ineta.org/latam)


    "Dexter" <> escribió en el mensaje
    news:...
    > Hello all,
    > I'm building a web custom control, but i hava a problem.
    > In the Sub Render, i have a html code as output. All ok.
    >
    > I have a other class that has a function that return a image object,
    > and i need to insert this image in my html of output, but it
    > don't has a path.
    >
    > Protected Overrides Sub Render(ByVal output As

    System.Web.UI.HtmlTextWriter)
    > dim saida as string
    > saida = "<table>"
    > saida += "<img src="">" --> ???????? What i do here to show the

    returned
    > image of my Function.
    > saida += "</table>"
    > End Sub
    >
    > Somebody can help me in this task?
    > Thanks
    >
    > Dexter
    >
    >
    Eugenio Serrano, Nov 27, 2004
    #4
  5. At design time, use of temp path is the safe bet. Use of relative path will
    only make sense at run time.Otherwise you will end up cluttering folders
    under your web site folders.


    "Eugenio Serrano" <eugenios(arroba)ndsoft.com.ar> wrote in message
    news:...
    >A best practice is use a Relative Path to the image..
    > You control could have a ImagePath Property...
    > --
    > Saludos,
    > Eugenio Serrano
    > NDSoft Consultoria y Desarrollo
    > MS MVP ASP.Net
    > Voluntario Ineta Latam (www.ineta.org/latam)
    >
    >
    > "Dexter" <> escribió en el mensaje
    > news:...
    >> Hello all,
    >> I'm building a web custom control, but i hava a problem.
    >> In the Sub Render, i have a html code as output. All ok.
    >>
    >> I have a other class that has a function that return a image object,
    >> and i need to insert this image in my html of output, but it
    >> don't has a path.
    >>
    >> Protected Overrides Sub Render(ByVal output As

    > System.Web.UI.HtmlTextWriter)
    >> dim saida as string
    >> saida = "<table>"
    >> saida += "<img src="">" --> ???????? What i do here to show the

    > returned
    >> image of my Function.
    >> saida += "</table>"
    >> End Sub
    >>
    >> Somebody can help me in this task?
    >> Thanks
    >>
    >> Dexter
    >>
    >>

    >
    >
    Naveen K Kohli, Nov 28, 2004
    #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. John Dalberg
    Replies:
    1
    Views:
    367
    Greg9Strat
    Mar 9, 2007
  2. Matt Sokol
    Replies:
    2
    Views:
    379
    Theo Tillotson
    Aug 7, 2003
  3. Donald Simpson

    Web Custom Control & Custom Collection problem

    Donald Simpson, Jul 11, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    129
    Donald Simpson
    Jul 11, 2003
  4. reetu

    How to build Datagrid custom web control?

    reetu, Jul 12, 2003, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    149
    Victor Garcia Aprea [MVP]
    Jul 15, 2003
  5. Leyla

    Web user control - custom web control - java script.

    Leyla, May 1, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    122
    Leyla
    May 1, 2006
Loading...

Share This Page