Addng a Custom User Control to HTML Content

This forum is primarily for reporting issues about Web Accessibility such as difficulty using mojoPortal with a screen reader or other assistive technology.

Post any feedback here related to improving the accessibility or usability of mojoPortal. As stated in our Accessibility documentation, it is an important goal of the project that both the front-end customer experience and the back end administration and content publishing features be accessible to as many people as possible. Ideally, if you post about problems, we will also be glad to have suggestions on how the problems can be fixed but all constructive feedback on these issues is welcome.

This thread is closed to new posts. You must sign in to post in the forums.
1/12/2011 4:19:37 AM
Gravatar
Total Posts 44

Addng a Custom User Control to HTML Content

Hi,

I have created a site with mojoPortal and one of the pages includes a user control that displays a table from an RSS feed (http://www.fpan.net/international-private-finance.aspx), only at the moment is doesn't, because I don't know how to include the control in the HTML content.

I'm assuming that I can build the page by adding modules, such as:

HTML Content Module
Custom User Control
HTML Content Module

But what I would really like to do is add the user control tag directly into the HTML content, has anyone successfully accomplished this?  I don't particularly want to create a new module for every custom page, I thought perhaps I could include a tag in the HTML that would be replaced with the user control at runtime.

Thanks in advance,

Vince. 

1/12/2011 6:58:58 AM
Gravatar
Total Posts 18439

Re: Addng a Custom User Control to HTML Content

Hi Vince,

Unfortunately implementing something like that  where you can use server controls in the editor is a very tall order and not likely to happen any time soon if ever.

Thanks very much for your generous donation, it is very appreciated and makes me wish I had an easy answer for you but I do not. You might look at strategies like implementing json service pages and loading things in the html using javascript that calls the json service, that would be one way to dynamically load some other content and make it re-usable in different places.

Best,

Joe

1/12/2011 7:08:31 AM
Gravatar
Total Posts 44

Re: Addng a Custom User Control to HTML Content

Thanks Joe, I will look at your suggestion and post the results.

Best Regards,

Vince. 

1/12/2011 1:26:14 PM
Gravatar
Total Posts 44

Re: Addng a Custom User Control to HTML Content

Thanks again for pointing me in the right direction Joe, what I did was;

Change the ascx to an ashx and put that in the Services folder

Add a $.ajax method to call the ashx and populate a div with the result

Added a div and a call to the $.ajax method in the HTML content module.

Best Regards,

Vince.

 

 

You must sign in to post in the forums. This thread is closed to new posts.