|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Client ID of User Control in Page templatesI 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. Instead of doing that during the page_load, do it while handling the
page.PreRender. Show quoteHide quote "Nilay Shah" wrote: > 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. > > 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 Show quoteHide quote "Phillip Williams" wrote: > Instead of doing that during the page_load, do it while handling the > page.PreRender. > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Nilay Shah" wrote: > > > 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. > > > > Yes. It is available in asp.net 1.1
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuicontrolclassonprerendertopic.asp Show quoteHide quote "Nilay Shah" wrote: > 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 > "Phillip Williams" wrote: > > > Instead of doing that during the page_load, do it while handling the > > page.PreRender. > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Nilay Shah" wrote: > > > > > 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. > > > > > >
Problem updating with TableAdapter in Detailsview.
Formview Question "AJAX" techniques for the ASPNET 2.0 TreeView control? aspx and ascx I need a chart control with a special feature Event from one WebControl triggering an event in another Web control HttpContext.Current.Session problem Sorting DataView problem Interactivity between placeholders & objectdatasouces Asp.Net AutoPostback and control focus |
|||||||||||||||||||||||