How to create codebehind for a Page and Form, and access con

Posted by Community Admin on 03-Aug-2018 14:59

How to create codebehind for a Page and Form, and access controls

All Replies

Posted by Community Admin on 19-Jun-2011 00:00
Hi,

I'm a SF4 newbie, I have created a Form and put it on a page but I need a Country dropdown list on the form, what I can do is drop the built in dropdown list and be able to get the control from Codebehind of the Form control or the page the form is on and bind it to a List of countries I already got.

I know the control Id is there for a reason, so you can access them from codebehind, I need to know how?

I have seen this post and this one too but I am not sure how to use the code without creating a page or custom widget.

Please help, thanks.
Posted by Community Admin on 20-Jun-2011 00:00
Hello Zubair,

There is no code behind of these controls, since they are compiles. You can inherit from the base class and bind the control to your data. You can use ChoiceField control in DropDown mode ( RenderChoicesAs.DropDown)

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 20-Jun-2011 00:00
Hi Ivan,

Thanks for getting back, I'm not sure if I understand you correctly, can you please provide a sample code or point me a post that answers the same thing?

thanks,
Posted by Community Admin on 20-Jun-2011 00:00
Hello Zubair,

Here is a sample that you can use as a starting point.

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 20-Jun-2011 00:00
Hi,

This looks like alot of work, would you recommend adding my own widget since I already got one?
This thread is closed