CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/15/2005 10:47:04 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 44 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
stschatz
Asp.Net User
Referencing a Child Control's ClientID from within the Server Control11/15/2005 10:47:04 PM

0/0

I am dynamically setting some javascript variables within a custom composite server control with the ClientIDs of the 2 other custom server controls.  Unfortunately, this is what the source on the client come out to be:

<select id="Custom1:_ctl0"><option></option></select>

<script>
    var v = document.getElementById("Custom1__ctl0");
</script>


Any idea why the ClientID on the select is different than that of the generated javascript?  Both the composite server control and the custom server controls that it contains implement iNamingContainer.



Stewart Schatz
Eilon
Asp.Net User
Re: Referencing a Child Control's ClientID from within the Server Control11/16/2005 4:13:52 PM

0/0

Can you please show how you're generating that HTML markup? I'm guessing that for the <select> tag you're using UniqueID, and for the <script> markup you're using ClientID.

Thanks,
Eilon
Blog: http://weblogs.asp.net/LeftSlipper/
stschatz
Asp.Net User
Re: Referencing a Child Control's ClientID from within the Server Control11/16/2005 5:09:11 PM

0/0

Thanks!  I got it.  I was using ClientID instead of UniqueID.

Thanks again.


Stewart Schatz
cyokin
Asp.Net User
Re: Referencing a Child Control's ClientID from within the Server Control11/17/2005 7:26:26 AM

0/0

ClientID for client

UniqueID for server (get client information)


How to advance an MVP
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Referencing a Child Control's ClientID from within the Server ... Referencing a Child Control's ClientID from within the Server Control ... composite server control with the ClientIDs of the 2 other custom server controls. ...
Finding asp control from javascript - ASP.NET Forums I can find asp controls from within the script as long as they are on .... get the value of the child control's ClientID property in server ...
Index from Developing ASP.NET Server Controls and Components by ... ClientID property composite controls with, 308 defined, 341 purpose of, 127 .... view state of child controls, 310-11 control life cyle phases, 175. ...
TheMSsForum.com >> Dotnet >> Stretching a middle child control in ... Thanks, Miro Tag: Stretching a middle child control in WPF Tag: 233666 ..... During partial page post backs the controls within the panel will change. ...
CodeProject: An ASP.NET Composite Control for US and UK dates ... The control consisits of three child controls but exposes only one value ..... the DateControl within a Web Form relative to other TextBoxes and Labels? ...
It Could Be Done!: What's Wrong with Accordion Control? When response Html is rendered, client id of my checkbox control becomes ..... All the controls within the first Accordion appeared null due to the problem ...
ASP.NET.4GuysFromRolla.com: An Extensive Examination of the ... NET Web controls, the DataGrid. Specifically, this part of the article series ... This is because the TextBox control is a child control of the DataGrid row ...
OPEN CONTROLS - Patent 20080168430 Jul 10, 2008 ... control on the server,. unique within the. scope of a naming ..... If a control needs to render child controls in a manner different from ...
Articles on hyperlink fror next page in repeater control Lets now use the control we created in step 3 : Apart from referencing the ... NET server controls ASP.NET Thumbshots Not an actual control, but a ha. ...
Automatic Control Prefixes like _ctl0 Control.ClientID. This will output the actual ID set for the client .... It has a asp:dropdown control within it ... and scattered about I ...




Search This Site:










site settings

the trust relationship between the primary domain and the trusted domain failed

problem setting a one-time fee security role (with paypal)

external web page in a masterpage contentplaceholder

solution explorer - sort order

content hierarchy

menu customization

the type of page you have requested is not served

internal login control rendering exception why?

in which dll is compiled the portalsecurity.vb ?

links, categories & articles don't appear on front page

help: all toolbox controls are disabled missing after installing webcontrols

logout event is not working

modules appearing on selected tabs.

howto avoid to load all the stylesheet files in a theme?

expire membership password automatically.

how efficient is membership and roles provider?

module to show title and then 5-10 lines of text....

asp.net portal installation - connect to sql server

best practices for module development and packaging with dnn4

sitemap provider - depth of an url

netframework

smculloch news articles - rss error

changing issuperuser flag.

personal starter kit for ms access

will dnn 3.0 include webservices support?

menu button with multiview

menu control

gemini issue tracker

print friendly, passing parameters and onmodulecommunication

 
All Times Are GMT