Several issues with building a user control

Discussion in 'ASP .Net Building Controls' started by Shannon Cayze, Jun 30, 2003.

  1. Hello all,

    I'm trying to build a user control (specifically, a date picker) and
    am experiencing several issues. Also, I'm brand new to web development
    and ASP.Net, so hopefully this will be fairly basic.

    First, when I place the control on a WebForm, the designer lets me
    place it exactly where I want it. However, when I run the app, the
    control is displayed in the top left corner of the parent container
    regardless of where it was in the designer.

    Second, when the control is loaded, I run a method to fill the month,
    day, and year DropDownLists with their values. However, they are empty
    when they are displayed. I know the code is executed, because I can
    throw an exception in the method. The AutoPostBack is set to true but
    I don't think this is ever triggered. One way I can think of is to
    force a PostBack but it doesn't seem that I'd need to.

    Thirdly, if I have the control in a separate .dll that is referenced
    by the web app, and include the namespace that it is under, I get the
    following exception when attempting to run the app, even though I've
    only got it defined in one .dll that is referenced: "CS1595:
    'CustomWebControls.DateTimePicker' is defined in multiple places;
    using definition from...". This is a problem because I want to be able
    to access the object in C# code.

    Lastly, how do you add a user control to the toolbox? When I select
    customize toolbox, and find the .dll that the control is in, I'm told
    that there are no items in the .dll that can be added to the toolbox.

    Thanks in advance,
    Shannon
    Shannon Cayze, Jun 30, 2003
    #1
    1. Advertising

  2. Shannon Cayze

    ctmhz Guest

    Why waste your precious time on develope it yourself?
    Take a look at http://www.orilogic.com/products

    Easy to use Date Picker, only cost $5.90,

    Rgds

    (Shannon Cayze) wrote in message news:<>...
    > Hello all,
    >
    > I'm trying to build a user control (specifically, a date picker) and
    > am experiencing several issues. Also, I'm brand new to web development
    > and ASP.Net, so hopefully this will be fairly basic.
    >
    > First, when I place the control on a WebForm, the designer lets me
    > place it exactly where I want it. However, when I run the app, the
    > control is displayed in the top left corner of the parent container
    > regardless of where it was in the designer.
    >
    > Second, when the control is loaded, I run a method to fill the month,
    > day, and year DropDownLists with their values. However, they are empty
    > when they are displayed. I know the code is executed, because I can
    > throw an exception in the method. The AutoPostBack is set to true but
    > I don't think this is ever triggered. One way I can think of is to
    > force a PostBack but it doesn't seem that I'd need to.
    >
    > Thirdly, if I have the control in a separate .dll that is referenced
    > by the web app, and include the namespace that it is under, I get the
    > following exception when attempting to run the app, even though I've
    > only got it defined in one .dll that is referenced: "CS1595:
    > 'CustomWebControls.DateTimePicker' is defined in multiple places;
    > using definition from...". This is a problem because I want to be able
    > to access the object in C# code.
    >
    > Lastly, how do you add a user control to the toolbox? When I select
    > customize toolbox, and find the .dll that the control is in, I'm told
    > that there are no items in the .dll that can be added to the toolbox.
    >
    > Thanks in advance,
    > Shannon
    ctmhz, Jul 5, 2003
    #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. Robert Neville

    Building several parsing modules

    Robert Neville, Mar 18, 2007, in forum: Python
    Replies:
    1
    Views:
    248
    Diez B. Roggisch
    Mar 19, 2007
  2. Replies:
    4
    Views:
    683
    =?Utf-8?B?RGF2aWQgQW50b24=?=
    Jul 31, 2007
  3. kingchuffalo
    Replies:
    0
    Views:
    853
    kingchuffalo
    Sep 21, 2008
  4. Victor \Zverok\ Shepelev

    RDOC: several related modules in several C files

    Victor \Zverok\ Shepelev, Mar 6, 2007, in forum: Ruby
    Replies:
    3
    Views:
    168
    Max Lapshin
    Mar 16, 2007
  5. kz
    Replies:
    0
    Views:
    119
Loading...

Share This Page