ASPX templates
Version 5.x > ASPX templates > Using web parts int ASPX method... View modes: 
User avatar
Member
Member
mark.goolie-fahlgren - 5/9/2011 9:44:59 AM
   
Using web parts int ASPX method...
I have a site set up using the ASPX method. I have written an user control/web part to perform a specific function. I added this user control/web part to the sites master page. It displays correctly but the button click event handlers are not being received by the user control/web part when viewing the live site. They work correctly inside of CMS Desk and in their own separate .net website. I have tried wrapping in the include usercontrol.ascx web part an the events were not received there either. How do I get my custom user controls/web parts to function in the live site?

Thanks,
Mark Goolie

User avatar
Member
Member
kentico_michal - 5/10/2011 2:19:34 AM
   
RE:Using web parts int ASPX method...
Hello Mark,

Do you use standard ASP.NET control which inherits from System.Web.UI.UserControl class or have you created custom web part which inherits from CMS.PortalControls.CMSAbstractWebPart class?

Are there any logs in the Event log related to this issue (Site manager -> Administration -> Event log)?

Moreover, which version of Kentico CMS you are using?

Anyway, postback is not working by default on root of the web site (where there is no specific page accessed) in Kentico CMS because of IIS settings. If you are using IIS 7 or higher, could you please make sure that httpErrors and modules section of your web.config file is set up according to following documentation: IIS 7 and higher

Best regards,
Michal Legen

User avatar
Member
Member
mark.goolie-fahlgren - 5/10/2011 7:13:19 AM
   
RE:Using web parts int ASPX method...
Michal,
I contacted support and they helped me figure it out. Here is their response.

Could you please check if this happens only on root of your web site or not? In other words, what can you in the browser URL bar (mydomain.com or mydomain.com/home.aspx) ?

What is the behavior if you try to access the same page/document with its original URL (/Home.aspx)?

I’m asking above, because postback is not working by default on root of the web site (where there is no specific page accessed) in Kentico CMS because of IIS settings. If you are using IIS 7 or higher, could you please make sure that httpErrors and modules section of your web.config file is set up according to following documentation?

http://devnet.kentico.com/docs/devguide/custom_url_extensions_iis7.htm