Hi Patrick,
Have you had a chance to see the suggestions in my last reply or have you
got any further progress on this issue? If there're anything else we can
help, please feel free to post here. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 23156280
| References: <8D************ *************** *******@microso ft.com>
<3E************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From:
st*****@online. microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Fri, 29 Jul 2005 01:27:16 GMT
| Subject: RE: Setting controls' name
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| Message-ID: <P3************ **@TK2MSFTNGXA0 1.phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Lines: 80
| Path: TK2MSFTNGXA01.p hx.gbl
| Xref: TK2MSFTNGXA01.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:1150 72
| NNTP-Posting-Host: tomcatimport2.p hx.gbl 10.201.218.182
|
| Hi Patrick,
|
| Welcome to ASPNET newsgroup.
| As for the setting ASP.NET server control's Name problem, here are some
of
| my understanding and suggestions:
|
| The "name" attribute of ASP.NET server controls which is rendered to the
| clientside browser is depend on the ID property of control. More exactly,
| it's just the UniqueID of the control which represent the "name"
attribute
| rendering to clientside. However, the UniqueID can't be set directly and
| is generated according to the "ID" property. And then we add top
level(not
| nested) controls onto asp.net page, the "UniqueID" will be identical to
the
| "ID". However, if the control is nested in other container controls(
| NamingContainer ), it's UniqueID(also clientID) will be generated derieved
| from its parent contaner's UniqueID(client ID). So you'll see a
hierarchical
| named UniqueID when adding subcontrols into existing NamingContainer .
|
| Also, as for your scenario, you're wanting to manually read the postback
| value through the clientside "name" attribute, I 'd recommend that you
use
| the control.UniqueI D to identify the control's postback value in the
| Request.Form collection. Also, for dynamically added control, we can
still
| use it's Property to get the value , is there any particular problem you
| met which prevent you from retrieving control's property value when
posting
| back?
|
| Anyway, if there're any further questions, please feel free to post here.
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure!
www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
|
| --------------------
| | Thread-Topic: Setting controls' name
| | thread-index: AcWTYY2DRpktsPr BTn+0CW17P5g+Ww ==
| | X-WBNR-Posting-Host: 198.240.128.75
| | From: "=?Utf-8?B?UGF0cmljaw= =?=" <qu*******@news group.nospam>
| | References: <8D************ *************** *******@microso ft.com>
| | Subject: RE: Setting controls' name
| | Date: Thu, 28 Jul 2005 03:46:04 -0700
| | Lines: 12
| | Message-ID: <3E************ *************** *******@microso ft.com>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| | NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| | Xref: TK2MSFTNGXA01.p hx.gbl
| microsoft.publi c.dotnet.framew ork.aspnet:1149 18
| | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| |
| | In addition, I have no idea why the controls were created as:
| | Form1:_ctl0, Form1:_ctl2, Form1:_ctl3
| | (i.e., there are no Form1:_ctl1)??
| |
| |
| | "Patrick" wrote:
| |
| | > I am dynamically creating TextArea and drop-down lists in ASP.NET
using
| | > something like HtmlTextArea eachTextArea = new HtmlTextArea();
| | >
| | > I tried to set the "name" of these TextAreas, etc. (e.g. <textarea
| | > name="NameOfTex tArea" rows="5" cols="60">some text area
| |
|
|