Client ID of User Control in Page templates

N

Nilay Shah

Hi,

I am coding in 1.1 framework.. And we have created Page Template classes
(the way Master Page works in 2.0) in 1.1 framework.. All the pages would
have code between follwoing tags.

<custom:pagebody id="pagebody" runat="server" templatepath=
"../PageTemplate.ascx">

.....

</custom:pagebody>

Because of this, all the control ids are rendered and names are changed once
page is loaded. In my page, Page1.aspx, there is a user control UC1.ascx.
And I want to create the javascript dynamically in my parent page i.e.
Page1.aspx where in I want to get the client id of one of the control in
UC1.ascx.

I was trying to get Client ID and Build Javascript in Page_Load function of
my page. But the client ID that I get on Page_load, gets modified because of
Page Template concept.

I am not able to find where should I build my dynamic JavaScript on parent
Page?

Please let me know,

Thanks,

Nilay.
 
P

Phillip Williams

Instead of doing that during the page_load, do it while handling the
page.PreRender.
 
N

Nilay Shah

Hi,

I think Page.PreRender is in .net 2.0 and not in 1.1... I am working in
1.1... and i am not able to find page.prerender event.. may be my MSDN is old
:) let me know if it is in 1.1

thanks,
nilay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top