Code behind option in page properties

Posted by Community Admin on 04-Aug-2018 15:08

Code behind option in page properties

All Replies

Posted by Community Admin on 27-Jun-2011 00:00

Hi

What is the 'Code behind type' option for in the page properties? Is there an example of how to use this option?

Thanks

Regards

Posted by Community Admin on 27-Jun-2011 00:00

Hi John,

Create a class which inherits from  System.Web.UI.Page  and use its type as a code behind of your page. It is similar like putting the code in the master page.

namespace Telerik.Sitefinity.Samples1

    public class PageBaseCustom : System.Web.UI.Page
   

        protected override void OnLoad(EventArgs e)
       
            base.OnLoad(e);
            Label lbl = new Label();
            lbl.Text = "hello";
            Controls.Add(lbl);

       
   



Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 04-Oct-2011 00:00

Can you please, Elobrate more and how can redirect from page to another by using these.

Ishtiyaq Mohammed

Posted by Community Admin on 04-Oct-2011 00:00

What path I can place /hhh/sss.cs?

Posted by Community Admin on 04-Oct-2011 00:00

Hello Ishtiyaq,

You can put the file in SitefinityWebApp or inside a custom class library and make needed references between the project and class library.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed