I need to display SharePoint WebPart in a PopUp.
Is there a way to do it?
You can also create a regular web part page, but base it on an empty master page, the result will be the same, but more customizable.
You can also maybe use a hidden DIV with a web part zone, if you need an overlay section and don't care if it's not an actual window
Create a custom application page (in _layouts) without any menu or navigation, then add a webpart into it and open that page as your popup.
Related
I've been working on a project and I noticed I reuse the same menu over and over again and it got to a point where, if I needed to change something I would need to change 20+ pages too because of it being a menu.
My question is, is it possible to have a single aspx file with the working menu on it, and have the other pages call it? So far I've tried
<?php include('Menu.aspx') ?>
<iframe id="myIframe" src="Menu.aspx" height="100%" width="100%"></iframe>
The later (iframe) showed something but I was unable to resize it and the links didn't work either. The php one didn't show anything. Any help would be appreciated, thank you very much.
You can use the following approaches to solve this:
Master Pages allow to have a common layout that is applied to several aspx pages. The master page defines a layout and provides some content placeholders that are filled in by the pages that reference the master page. Your example of a menu fits good; the menu would be placed on the master page. See this link for details.
Another way to share layouts are ASP.NET UserControls. These are created as ascx files and can be reused in several aspx pages. See this link for details.
The best option for you is to create an User Control, and use it in all your pages.
An user control is similar to a server control (e.g. asp textbox, update panel etc.), but custom made by the developer to suit his specific needs.
If the menu is more like the common layout/theme of all your pages you can use a Master Page instead.
You have to make yourself familiar with master pages. See this as a beginner tutorial: http://www.codeproject.com/Articles/333650/Beginner-s-Tutorial-on-Master-Pages-in-ASP-NET
There are two option to reuse menu in asp.net page.
Master Page
User Control
using sitemap and add into master page.
https://msdn.microsoft.com/en-us/library/aa581781.aspx
http://webproject.scottgu.com/CSharp/MasterPages/MasterPages.aspx
Hope this will help you.
thanks
I am developing a Windows Phone 7 application. My requirement is to create side menu control which is similar to facebook side menu. My application has 10 XAML pages. I want to use this side menu control in all of my pages. I don't want to copy paste the code in all the 10 pages. Instead i am preferring to create a global XAML page and use across the pages. If i click the side menu, it should open like facebook side menu in all of my 10 XAML pages. I am having the source code in which the control is used in only one page. But i want to use the control globally. Any help appreciated.
You can either extract side menu ability in a separate user control and then simply use that user control on every page or you can create a page that acts as a frame around user controls.
In the former case, you need to copy/paste a few lines of code on every page you have to add the side control. In the latter case you must do the following:
- create a master page which contains a side control and has an empty space for the page's content
- instead of writing pages, write user controls and load them inside the master page
- when navigating, simply reload the content in the middle.
The latter case gives you full control, but you develop your applications differently.
We would like to create a new website with a common menu and navbar across all the pages (except start/login page) .
The thing is that we are going to use the twitter bootstrap framework and dont know if this could be achieved with the framework only (or with any html + css trick)...
Previously we have used iframes for this cases but we prefer to do a frameless website this time and dont know how the framework will behave with master pages...
Any suggestions? If the only way is using master pages, could you provide some sample or link?
Use asp.net master pages. I think this has nothing to do with twitter bootstrap framework.
Create a empty parent masterpage with a header and a body container only.
Create two web forms using the parent master page for the start and login pages.
Create a children master page using the parent master page and implement the menu on the children.
Create everything else using the children master page so you will have a menu on every page.
If you want a menu less page, use the parent.masterpage. If you want the menu version, use the children.masterpage.
Master page is the way to go. Here is a walk through.
You should use a master page. Here is a link to the asp.net tutorial on master pages: http://www.asp.net/web-forms/tutorials/master-pages
I am just learning .net and i wonder if it is possible to create drop lists like the one shown above or having a list type item where if + is pressed the item is expanded and when - is pressed again it minimizes.
!
Thank you
You can try using:
1 . ASP.Net Ajax Accordion Control
The Accordion is a web control that allows you to provide multiple panes and display them one at a time. It is like having several CollapsiblePanels where only one can be expanded at a time. The Accordion is implemented as a web control that contains AccordionPane web controls. Each AccordionPane control has a template for its Header and its Content. We keep track of the selected pane so it stays visible across postbacks.
2 . ASP.Net MultiView Controls
The MultiView and View Web server controls act as containers for other controls and markup, and provide a way for you to easily present alternate views of information.
You can use the MultiView and View controls to perform tasks such as the following:
Provide alternate sets of controls based on user choice or other conditions. For example, you might allow users to select from a list of feeds, each of which is configured in a separate View control. You can then display the View control that contains the user's choice of feeds. You can use the MultiView and View controls as an alternative to creating multiple Panel controls.
Create a multi-page form. The MultiView and View controls can provide behavior that is similar to the Wizard control. The Wizard control is particularly suited to creating forms that users fill in step by step. The Wizard control also includes support for more built-in UI elements, such as a header and footer, for Previous and Next buttons, and for templates. You might use a MultiView control in place of a Wizard if you wanted to create a display that changed based on condition (rather than sequentially), or if you did not need the extra features supported by the Wizard control.
You should read about TreeView Structure.
Read this
You could do it in your code behind, but I would suggest looking into using a jQuery plugin for this. Dependent on which one you want, you will just need to render the contents, then have the plugin make it pretty :)
I always like using : http://jquery.bassistance.de/treeview/demo/
I'm working on a asp.net website and I have created a user control where I've placed a menu to be used on the master page. Now I want to be able to change the language on each menu item by using a resource file. How do I change this on a user control? I've worked it out on a regular aspx-page but ascx workes different as it derives from System.Web.UI.UserControl.
How did you do it on the aspx page? You can go into design mode, select generate local resources and the resx file will be generated for you. For User Controls it works the same way as for ASP.NET web forms.