I am having a grid records and a button at the top of the grid. Once a record is selected from the grid and button is clicked, I have to render a partial view with a form inside. I don't know how to render partial views from controller. Please find my folder structure below:
--views
--partials
--header
--footer
--main
--form_page
--route
--index
--api
--grid
Header and footer is default for all the pages. Initially main page will be rendered as partial view. I have to replace it with form_page after the button click. It is based on express js and handlebars.
Related
I have this use case:
a layout with: header, footer, navigation and workarea
the navigation pilet fetches the pilet list fom a server (the list can change) and register the pilets in the list
all the pilet in navigation are rendered in the workarea (one at time)
Is it possible to do this?
An image on what I'm trying to do:
I'm building a site in Kentico 12 MVC and working on setting up content personalization. The normal way to do this is to add an editable area in the view:
<div>
#Html.Kentico().EditableArea("area1")
</div>
Then, in the CMS, the Page tab will show an empty area where the user can add a widget with personalized content.
The problem is that the content I want to personalize is located in my site's login box, which is a common element on every page, so I'd need to manually add a widget into the editable area on every page individually. But my site has over 300 pages, so that's totally impractical.
Is there a way from within my view model that I could check if the editable area has any widgets, and if it doesn't, output default content instead? I'm trying to see if there's an API method or something that would let me count the number of widgets inside an editable area, but I can't find anything in the documentation.
I guess you need to check with regex if Editable area html contains widget tag "<object type="widget" >"
I am using ng-translate for localisation in my project. It is working perfect for static content but I am not getting how to translate dynamic content which is coming from database (by making api calls).
I have layout page and index page which extends layout page. This index page also contain dynamic menu which is shown on top. I have also one menu for selection of languages. Now when i am selecting language, it is translating the static content on layout, index, partial view and menus. My question is how I will make my dynamic content like menus item, content on layout page, content on partial view page to be translated automatically ?
Any suggestions will be deeply appreciated.
I am using the bootstrap modal window as data picker. But when having more results to pick displaying pagination. I want to load the next pages inside the same modal window when clicking on the pagination.
Can I do it in generic way like when any link clicked inside a modal window to load the content inside the same modal window, or do I need to implement this for each link separately using AJAX feature?
Please refer this three links: There will help you for sure.
Reference-1
Reference-2
Reference-3
You could change $('modal-body').html() on click.
The modal shows/hide without changing or reloading content. So you will have to restore the original content on hide maybe.
Use $('#myModal').on('hidden.bs.modal', function () {} to restore your original content.
I have a user control (ascx) inside a page (aspx). The ascx has JQGrid placed. I have a button in the page. On click of button I show AJAX modal popup.
The problem is: On click of button, document.ready in ascx is also getting called which in turn loads the JQGrid. I would like to avoid this.
To summarize, I do not want to reload JQGrid inside the ascx when post back happens from hosting page.