More in this section

Forums / Developing with Sitefinity / Communication between .ascx and back end file (.ascx.cs) Module Builder Sitefinity 5

Communication between .ascx and back end file (.ascx.cs) Module Builder Sitefinity 5

1 posts, 0 answered
  1. Waseem
    Waseem avatar
    24 posts
    31 Jul 2012
    01 May 2012
    Link to this post
    For last couple of days I am struggling to add any functionality in code behind file of a user control in Sitefinity 5.x. I have created my module with Module Builder and according to Gabe Sumner's video tutorial a user control needs to be created in SfCtrlPresentation folder with some specific naming conventions so that we can work with the user control in visual studio.
    Now, as i have recently started using sitefinity and don't have any previous experience with it, I am just taking it for granted that a user control (.ascx) always communicates with its back end file (.ascx.cs file) as in usual or any other web applications but here in Sitefinity 5.x, I have no control on code behind file and no matter what control (e.g div, text field, buttons etc.) I place on .ascx file it is not accessible in code behind file and if does, than it doesn't give me the value associated to it.
    Previously i left a post regarding the issue that my button click event is not firing and I was advised by Dimitar Dimitrov to register my event handler in Page_Init, that didn't work.
    Now, could please anyone tell me if there is any way around to work with code behind file, while I am creating my module with Module Builder or I have to stop using module builder and get back to the technique (Custom Modules) that is used in the previous versions of Sitefinity. Any advice will really be appreciated!
1 posts, 0 answered