RE: Custom Controls driving me nuts

Discussion in 'ASP .Net' started by =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Jun 3, 2005.

  1. I hope this is not overly blunt, but you are asking a specific question in a
    very general way and hoping someone else has had similar issues and can
    validate your thinking. The problem is this: even if someone has had a
    similar problem and can commisurate, it does not mean the two of you have
    found a bug. It may mean the two of you are making the same error due to the
    same, or similar, misunderstanding of .NET. I have three choices:

    1. Ask for something to repro
    2. Continue making controls until I hit your issue, if ever
    3. Attempt to make a control that does not always render 100% of the HTML
    and throw it out for you to examine to see if it is the same issue you are
    having

    I have created tons of controls, from user controls to compiled server
    controls, some that inherit from other controls and some that are truly
    custom. To date, I have not seen the issue you are describing. Without a
    method of reproing your issue (i.e. a bit of sample code that repros the
    issue), I have no method of determining if it is a bug or a misconception.

    My suggestions:

    1. Set up the simplest control and page that illustrates the issue you are
    having and post it here. Then, someone can take the code and look at it and
    determine whether or not there is a bug. If so, there will likely be either
    a) a patch or b) a workaround. If not, you will likely get a much better
    answer on how to fix your issue.

    2. Step through the code completely and watch what goes on. You will likely
    have to include the control project and use a project reference (rather than
    a compiled code reference) to determine what is happening. This may not solve
    the issue, but watching the ordering of methods firing and the call stack is
    a wonderful way to understand the inner workings of .NET (at least I find it
    fascinating, but I am often confused with a mega geek :->).

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************


    "david" wrote:

    > Hello hello.
    >
    > I'm trying to create a couple of custom controls.
    > Some of them needs to have other controls nested inside.
    > Simple stuff really (if you do not count getting it to work with the
    > VS.Net designer).
    >
    > I'm having a problem though. Not sure if it's a bug, but it could be.
    > Seems like ASP.Net takes the HTML content nested in the custom control,
    > throws it up in the air, catches some of it, and whatever it catches, it
    > outputs to the browser. (It's not really that random, but you get the
    > idea).
    >
    > To demonstrate, I've made a test case.
    > - Compile the attached custom control ("_") and drop it in a bin/
    > folder in your IIS web.
    > - Also drop test.aspx{,.cs} in your IIS web.
    >
    > Browse to the test page.
    > You'll notice that the parts of the page marked in green and red does
    > not look alike.
    >
    > Open test.aspx, and you'll notice that they really /should/, since it's
    > the same HTML.
    >
    > Do a 'view source' in your browser, and you'll notice all the missing
    > bits and pieces.
    >
    > When you're all done with that, you can try again, but this time remove
    > line 39 of test.aspx first. Magic.
    >
    >
    > My question is, am I doing something wrong, or is this a bug?
    >
    >
     
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Jun 3, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN

    david Guest

    Cowboy (Gregory A. Beamer) - MVP wrote:
    > I hope this is not overly blunt, but you are asking a specific question in a
    > very general way and hoping someone else has had similar issues and can
    > validate your thinking. The problem is this: even if someone has had a
    > similar problem and can commisurate, it does not mean the two of you have
    > found a bug. It may mean the two of you are making the same error due to the
    > same, or similar, misunderstanding of .NET. I have three choices:
    >
    > 1. Ask for something to repro
    > 2. Continue making controls until I hit your issue, if ever
    > 3. Attempt to make a control that does not always render 100% of the HTML
    > and throw it out for you to examine to see if it is the same issue you are
    > having
    >
    > I have created tons of controls, from user controls to compiled server
    > controls, some that inherit from other controls and some that are truly
    > custom. To date, I have not seen the issue you are describing. Without a
    > method of reproing your issue (i.e. a bit of sample code that repros the
    > issue), I have no method of determining if it is a bug or a misconception.
    >
    > My suggestions:
    >
    > 1. Set up the simplest control and page that illustrates the issue you are
    > having and post it here. Then, someone can take the code and look at it and
    > determine whether or not there is a bug. If so, there will likely be either
    > a) a patch or b) a workaround. If not, you will likely get a much better
    > answer on how to fix your issue.


    Hello Gregory;

    I'm not sure what happened.

    Either the usenet server at Microsoft removed the attachments, or you
    need a new pair of glasses ;-).

    A test case was attached to my posting that clearly illustrates the problem.

    It's as minimal as it gets, it's about 50 lines of code.

    I have uploaded it to a FTP server, in case that will get through to you
    better. Please see below.

    ftp://130.227.153.74/testcases/customcontrol.zip
    ftp://130.227.153.74/testcases/customcontrol-demo.png
     
    david, Jun 3, 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. bob

    format driving me nuts

    bob, Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    405
  2. Simple Simon

    DateTime driving me nuts

    Simple Simon, Jul 29, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    380
    Simple Simon
    Jul 29, 2003
  3. Marty

    Driving me nuts...

    Marty, Nov 10, 2003, in forum: ASP .Net
    Replies:
    12
    Views:
    710
    Guest
    Nov 12, 2003
  4. Bjoern Wolfgardt

    Impersonate and IIS6 driving me nuts

    Bjoern Wolfgardt, Jan 15, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,157
    bruce barker
    Jan 16, 2004
  5. Simon Harris

    XMLDocument - Driving me nuts!!

    Simon Harris, May 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    333
    Simon Harris
    May 11, 2005
Loading...

Share This Page