No html insertion in the *.aspx file

Discussion in 'ASP .Net Web Controls' started by arTleVark, Jul 6, 2004.

  1. arTleVark

    arTleVark Guest

    I've developed a custom control, and added it to my toolbox. Everything worked fine.
    I took the control back home, added it to my toolbox, but when I try to drag it onto my *.aspx file there is no more html generated or inserted in the file. The control get's a declaration in the *.aspx.cs codebehind file though.

    Any solutions to this problem?
    arTleVark, Jul 6, 2004
    #1
    1. Advertising

  2. arTleVark

    S.Grevi Guest

    You already tried to see if in the *html* part (.aspx) of the page you have
    a reference to the control ?

    If yes, keep in mind that all the HTML is in your .ascx file and it's parsed
    and rendered as HTML afterwards.
    In facts you have only to worry if in the .aspx.cs files you don't have the
    reference OR in the .aspx you don't have a line like this one on top of the
    page :

    <%@ Register TagPrefix="kc" TagName="customControl"
    Src="../myCustomControl.ascx" %>

    which is used for referencing your custom control, and :

    <kc:customControl id="cmbCustom" runat="server"></kc:customControl>

    which is used as 'placeholder' and replaced, as needed, with the HTML code
    present in the .ascx file.

    ....or I did'nt understood the point.


    Stefano Grevi

    "arTleVark" <> wrote in message
    news:...
    > I've developed a custom control, and added it to my toolbox. Everything

    worked fine.
    > I took the control back home, added it to my toolbox, but when I try to

    drag it onto my *.aspx file there is no more html generated or inserted in
    the file. The control get's a declaration in the *.aspx.cs codebehind file
    though.
    >
    > Any solutions to this problem?
    S.Grevi, Jul 6, 2004
    #2
    1. Advertising

  3. arTleVark

    arTleVark Guest

    The reference is there,

    it's the <kc:customControl id="cmbCustom" runat="server"></kc:customControl> part that's not inserted.

    I already have figured one part,
    most of my controls inherit from my base control, which is derived from WebControl. It seems all controls that are not derictly derived from WebControl produce this problem.


    "S.Grevi" wrote:

    > You already tried to see if in the *html* part (.aspx) of the page you have
    > a reference to the control ?
    >
    > If yes, keep in mind that all the HTML is in your .ascx file and it's parsed
    > and rendered as HTML afterwards.
    > In facts you have only to worry if in the .aspx.cs files you don't have the
    > reference OR in the .aspx you don't have a line like this one on top of the
    > page :
    >
    > <%@ Register TagPrefix="kc" TagName="customControl"
    > Src="../myCustomControl.ascx" %>
    >
    > which is used for referencing your custom control, and :
    >
    > <kc:customControl id="cmbCustom" runat="server"></kc:customControl>
    >
    > which is used as 'placeholder' and replaced, as needed, with the HTML code
    > present in the .ascx file.
    >
    > ....or I did'nt understood the point.
    >
    >
    > Stefano Grevi
    >
    > "arTleVark" <> wrote in message
    > news:...
    > > I've developed a custom control, and added it to my toolbox. Everything

    > worked fine.
    > > I took the control back home, added it to my toolbox, but when I try to

    > drag it onto my *.aspx file there is no more html generated or inserted in
    > the file. The control get's a declaration in the *.aspx.cs codebehind file
    > though.
    > >
    > > Any solutions to this problem?

    >
    >
    >
    arTleVark, Jul 7, 2004
    #3
  4. arTleVark

    S.Grevi Guest

    That's tricky.

    This case didn't happened to me in the past because I didn't tried to build
    a custom webcontrols chain of inheritance and use it ... till now.
    Doing the work 'by hand' and putting on the .aspx the reference solve the
    problem arTleVark ?
    If it's so it could be only a IDE problem, even if I hardly figure out that
    the test of this case was missed by Microsoft.

    I try to look for the solution, if I found it I'll put in this thread.(The
    matter is really tricky...).

    Stefano



    "arTleVark" <> wrote in message
    news:...
    > The reference is there,
    >
    > it's the <kc:customControl id="cmbCustom"

    runat="server"></kc:customControl> part that's not inserted.
    >
    > I already have figured one part,
    > most of my controls inherit from my base control, which is derived from

    WebControl. It seems all controls that are not derictly derived from
    WebControl produce this problem.
    >
    >
    S.Grevi, Jul 7, 2004
    #4
  5. arTleVark

    arTleVark Guest

    I can add the controls "by hand" (ie, coding the html tags in the aspx etc), and then the controls show up in design view,
    just when I drag them from the toolbox the html code is not inserted.

    What I find the weirdest is that on day1 everything worked fine...

    "S.Grevi" wrote:

    > That's tricky.
    >
    > This case didn't happened to me in the past because I didn't tried to build
    > a custom webcontrols chain of inheritance and use it ... till now.
    > Doing the work 'by hand' and putting on the .aspx the reference solve the
    > problem arTleVark ?
    > If it's so it could be only a IDE problem, even if I hardly figure out that
    > the test of this case was missed by Microsoft.
    >
    > I try to look for the solution, if I found it I'll put in this thread.(The
    > matter is really tricky...).
    >
    > Stefano
    >
    >
    >
    > "arTleVark" <> wrote in message
    > news:...
    > > The reference is there,
    > >
    > > it's the <kc:customControl id="cmbCustom"

    > runat="server"></kc:customControl> part that's not inserted.
    > >
    > > I already have figured one part,
    > > most of my controls inherit from my base control, which is derived from

    > WebControl. It seems all controls that are not derictly derived from
    > WebControl produce this problem.
    > >
    > >

    >
    >
    >
    arTleVark, Jul 7, 2004
    #5
  6. arTleVark

    S.Grevi Guest

    ....it's sad to say that our favourite sentence to freeze an angry boss is
    'yesterday it worked, what happened ?' ;-)

    But it's not only the technology which is trying to put obstacles on the
    road of success, it's sometimes the code-sharing !

    Anyway, I found this article on Custom Webcontrols that put a little light
    on our work (eve the mine). Look at the Figure 1 at the beginning of the
    class declaration of the custom control. I think that, like in mine, is
    missing this attribute (...Aspect Oriented Programming...).

    Could this help ?

    Stefano

    "arTleVark" <> wrote in message
    news:...
    >
    > I can add the controls "by hand" (ie, coding the html tags in the aspx

    etc), and then the controls show up in design view,
    > just when I drag them from the toolbox the html code is not inserted.
    >
    > What I find the weirdest is that on day1 everything worked fine...
    >
    S.Grevi, Jul 7, 2004
    #6
  7. arTleVark

    S.Grevi Guest

    S.Grevi, Jul 7, 2004
    #7
    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. vish
    Replies:
    2
    Views:
    1,724
    Steve C. Orr, MCSD
    Jul 16, 2003
  2. Mr. x
    Replies:
    1
    Views:
    1,963
    John Timney \(Microsoft MVP\)
    Nov 30, 2003
  3. Paolo Pignatelli
    Replies:
    6
    Views:
    2,182
    Paolo Pignatelli
    Feb 21, 2005
  4. John M
    Replies:
    1
    Views:
    1,126
    Kumar Reddi
    May 29, 2005
  5. Serious_Practitioner

    For VK - Revisiting Insertion of HTML into JavaScript

    Serious_Practitioner, Jan 28, 2007, in forum: Javascript
    Replies:
    1
    Views:
    104
Loading...

Share This Page