This project is read-only.

DevExpress Controls and Blogengine

Topics: Controls, Themes
Jun 5, 2014 at 11:27 AM

does anybody know how I can implement DevExpress Controls into a Post?


Best Regards Jürgen
Jun 5, 2014 at 1:51 PM
Put the controls in to your /controls folder

Then either inject them:

[ Code ]

One by one per post

Or Register the control and then use it:

Registering at the very top of the template
<%@ Register Src="Custom/Controls/CommentView.ascx" TagName="CommentView" TagPrefix="uc" %>

This goes where ever within the template you wanted it to be displayed at.
<uc:CommentView ID="CommentView1" runat="server" />
Jun 5, 2014 at 6:25 PM
Edited Jun 5, 2014 at 6:26 PM

many thanks,

But now I get following error:

Object reference not set to an instance of an object.
BlogEngine.Core.Web.Controls.PostViewBase.OnInit(EventArgs e) in j:\Projects\BlogEngine_2_7_0_0\blogengine_4f5eed923a57\BlogEngine\BlogEngine.Core\Web\Controls\PostViewBase.cs:292

Line 139: postView.Location = ServingLocation.PostList;
Line 140: postView.Index = counter;
Line 141: this.posts.Controls.Add(postView);
Line 142: counter++;

I registred my UserControl in the PostView Controls as followed:
<%@ Register Src="~/User controls/Statistik.ascx" TagPrefix="uc" TagName="Statistik" %>
and use it
<uc:Statistik ID="Statistik1" runat="server" />

What went wrong?

Best Regards Jürgen
Jun 6, 2014 at 6:39 AM

I fixed it.
Everything works now.
Thanks for help.

Best Regards Jürgen