problem with name created when control is rendered.

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default problem with name created when control is rendered.

    Hello,
    I am creating a html server control that is in a datalist. I need to access
    this controls value on the client via javascript but the name is being
    overwritten with a unique value generated by ASP.Net. This makes it rather
    impossible to access the control in javascript because I do not know what
    the name of the control is.

    Is there a way I can keep the original name that I assign it?

    Thanks,
    Sean Gamino


    Sean Gamino Guest

  2. Similar Questions and Discussions

    1. RegisterClientScriptBlock with rendered control?
      Hi, Are there any issues using ClientScriptManager.RegisterClientScriptBlock in a rendered control? I'm calling this function within the...
    2. User Control not rendered in Visual Studio
      I have created a custom composite server control. When I drag the control from the toolbox into Visual Studio it does not display in Visual Studio,...
    3. Dynamically created control in Datagrid problem
      I created a datagrid with 4 bound columns and 1 template column. I am using the ITEMDATABOUND event to add a control to the template column, if...
    4. Repeater control in a rendered custom control
      I have created a custom control that puts a html wrapper around some code so <myc:cPanel ...>more html</myc:cPanel> will draw a html table which...
    5. ControlDesigner not invoked on custom control when control is rendered within another custom control
      I have a custom control that has a simple designer (derived from System.Web.UI.Design.ControlDesigner) associated with it (using the...
  3. #2

    Default Re: problem with name created when control is rendered.

    You're better off telling your JavaScript code what the unique ID of the
    control actually is.

    If your control is in a datalist, won't there be multiple copies of it? In
    that case, you _need_ unique IDs.

    --
    John Saunders
    Internet Engineer
    [email]john.saunders@surfcontrol.com[/email]


    "Sean Gamino" <sean.gamino@redstone.army.mil> wrote in message
    news:OYWP4V8TDHA.2128@TK2MSFTNGP12.phx.gbl...
    > Hello,
    > I am creating a html server control that is in a datalist. I need to
    access
    > this controls value on the client via javascript but the name is being
    > overwritten with a unique value generated by ASP.Net. This makes it
    rather
    > impossible to access the control in javascript because I do not know what
    > the name of the control is.
    >
    > Is there a way I can keep the original name that I assign it?
    >
    > Thanks,
    > Sean Gamino
    >
    >

    John Saunders Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139