.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Webpart on multiple pages

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :SharePoint

I'm trying to have a webpart displayed on multiple pages. However, this webpart gets different data based on what is in the URL, so the situation explained in this link http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/5d0672ad-9b39-40b8-a60c-bfcb9e6895b7/ will not work. Is there any way to say, create a template or something and drop my webpart in it, and have the webpart "know" what is in the query string, and display its data accordingly? I tried altering the WebPartPage.aspx file in SP Designer with no luck; I couldn't figure out how to get the aforementioned webpart in there.


Thanks for any help or ideas to try. Appreciate your time.

View Complete Post

More Related Resource Links

How to create Webpart pages dynamically ?


Hello friends,

I need to programatically  create a webpart page on my sharepoint sit on the activation of a feature and after creation of that page, i need to add a webpart. How i will do that? Is it possible create a Webpart page dynamically?


Inherit from multiple master pages


How does one inherit from multiple master pages?


I.e.  I have a base master page that contains several ContentPlaceHolders.









I want to have separate master page files (one for each ContentPlaceHolder) so that I have 4 separate files: 3 ContentPlaceHolders (each adding specific content) and 1 base master page.

The ASPX files will then inherit from the base master page.



Multiple selection in connected list view webpart

Hi all, I have a webpart page with 2 listview webparts connected via  ("Send Row of Data"/"Get filter values from"). This connection permits me to select one row on the first listview (parent) and the second (child) gets filtered by the defined filter column. My question is how can I choose multiple rows on the parent so I can filter the rows of the child with multiple filter values? It seems on can only select one row via the "Select" column... Is there a workaround... Many thanks,  

Custom Webpart not working on "My Profile" page but works on all other pages. Linq Problem?

Hi, I created a publication site and in that site i created pages with specifique metadata (using a pagelayout with a custom content type)0. My webpart is getting data from those pages and displaying it. My webpart works on every page except on the "my profile" page(overview tab). I get the following error: Invalid Url: /TestSites/course I used the SPMETAL to create a class and i'm using this class to retrieve the data from the pages (with linq). The url i give to the entity is http://pcp/TestSites/course  this works fine on every site except on the my profile page. Can anybody help me? Here is the code i use to retrieve my data: EntitiesDataContext ctx = new EntitiesDataContext(courseSite); //Code below gets only the pages with a courses contentType. //EXCEPTION TRIGGERT ON THE FOLLOWING LINE IF IN PROFILE PAGE EntityList<Courses> course = ctx.GetList<Courses>("Pages"); //Writing the query to get the correct pages(with the course page layout only! var Query = from myCourse in course.ToList() where myCourse.CourseParticipants.Contains(myWeb.CurrentUser.LoginName) Select new{myTitle = myCourse.CourseTitle, myCompany = myCourse.Company, myPath = myCourse.Path, myName = myCourse.Name }; Thx.    

how to hide .aspx extension for multiple pages


In MVC it's very easy to control routing.


In my classic ASP.NET application I want to "hide" .aspx extension


I can do it with new ASP.NET 4 feature: MapPageRoute

  1. routes.MapPageRoute("login""login""~/login.aspx");  
routes.MapPageRoute("login", "login", "~/login.aspx");


Now http://site.com/login will work. But I have more than 50 pages, and adding 50 rules is ridiculous.


How can I solve this?


creation of multiple .aspx pages from database name


 hi ,
i am making an internal social networking application for my small organisation where i work  .i have a list of all employee  names in a mssql 2000 database that are the names of 5000 employees of the company  one by one arranged in rows in a single coloumn of a table . i have a folder ,i want to make  .aspx files/pages in that folder ,the file name should be same as names of the person in database coloumn.can any help me with codes to automatically make the .aspx pages with the same names as it is in database coloumn.(note that folder will not take any duplicate values(name will not be repeated)) .i am making application using asp.net 2.0.file will be automatically created in the folder as soon as new name is entered in database.its very difficult to make 5000 aspx page with each employee name and it will be difficult to make new pages again and again after new employees names are entered.so i want that files will be automatically created after employee names are registered.  

thanks in advance.

hoping for help for someone.

How do I get PrintPreviewDialog to show multiple pages?



I’m developing a Windows program using VS2010 and .NET 4.0.

I want to preview the printing of a text file using the PrintPreviewDialog.ShowDialog method.

The text being sent to the preview is 192 lines, but when the preview dialog box appears, it only shows one page of 60 lines.

How do I get the print preview to show multiple pages?

Any help would be gratefully appreciated.

Group report splitting into multiple pages Need it in 1 page


1) Few of my group reports which have more than 500 rows are splitting into many pages without column header. (eg, page 1, page 2... etc.) I would like configure it to be in one page however large it may be.

2) I tried setting column header in group reports which are splitting into multiple pages but its not working.

Either I need achieve point 1 or point 2

Could you please help me how to achieve it?


Dynamic Data. Multiple Custom Pages For The Same Table



I've just started out my first project using Dynamic Data and I've been running into a series of problems. Dynamic Data doesn't seem to be swimming in documentation. Anyway, my setup is:

  • Visual Studio 2010
  •  .net 4.0
  • Dynamic Data Domain Service Web Application Project Template (I have the RIA Services for ASP .net installed)
  • using an Entity Data Model
  • using a DomainService class
  • ASP .net Membership

There are a couple of things I am trying to achieve:

  1. I have my scaffolding turned on for all the tables. I am using the RequiresRole attribute in order to restric access to some tables. I have understood how you can create a Custom Page Template for a certain table, no problems there. I would like to be able to use the default PageTemplates for lets say the Administrator role and the Custom Page Templates for another role; the idea would be that the Administrator would be able to edit anything in the DB, but the restricted user would receive a Custom Page with only a few actions available. Long story short: is there a way to access both the standard and custom templates?
  2. Related to question number 1: Can I have multiple Custom Page Templates for the same table? I saw someone asking

    Multiple same ID on different pages - one CSS file



    I`s my first post so hello to everybody.

    I am fresh to web programming and I have a questions.

    In my project I have few pages. On two of them I have <div> s, inside of which I have textboxes. The Id`s of the <DIV>s are the same, and I don`t want to change them because they are giving me information about what Div is it.

    Ofcourse, as they are in different web pages, thy need to have a different style.

    How to deal with it in the CSS file? Is that possible e.g. to create a class e.g. "Page1", and assign a style to Id`d inside that class??



How to make it work multiple "I need to.." webpart in the same page..


I am trying to create multiple "I need to.." web parts in the same page.  But only first created web part working.  Rest of all the web parts either not respond after click "GO" button or goes to the first web parts selection, even click on another web part.  I am using Team Collaboration web page.  I tried to create different custom list to different web part did not work, and link to the same custom link with different filter settings as well did not worked.

Some search across the web showing few people have same problem, but no clear fix found.  Does anybody know some sort of tweaking or coding for this problem..

I am using Sharepoint 2007 with MOSS2007..


Can we show a line chart on multiple pages with page breaks? SSRS 2008


Hi there,

I am using SSRS 2008. I have a line chart which queries a huge dataset and shows the datapoints really close to each other that the labels and grid-lines are overlapping onto each other. http://oi54.tinypic.com/2vifrb9.jpg

Is there a way to split the chart and show it on different pages.? Thanks in Advance :)


Multiple web pages


If you have multiple pages, lets say a login page and another page called page2.  I want it so everytime it starts with the login page first before goin to the other page.  How do i do this???

SQL Server Job Generates Multiple Emails and Pages


In SQL Server 2005 I have set up a job with an email/pager alert via Database Mail.  It is working, but I am getting about 10 emails/pages every time the job runs.  Any ideas on why this is occurring?


Multiple pages printing in WPF


Hello there,

I have a grid that contains data spaning across multiple pages, for that matter take an example of the Excel Spreadsheet. My grid spans across multiple rows as well as columns which doesn't fit on one page.

I am using PrintDocument in that scenario and using DocumentPaginator class. I use DrawingContext to draw my text pixel by pixel, looping through the data in my grid.. Which SUCKS.. Is there a way to directly bind my grid to some kind of object which takes some parameters like page margin etc.. and in turn takes care of my printing (multiple rows and multiple columns..)?? If the columns I have don't fit on one page then I want to have a page break and have the data spanned across multiple pages.. Kinda like Excel spread sheet printing..

Any help on this would be greatly appreciated..

Thank you.

Tablix On Multiple Pages not span across pages equaly


I have a reports with some controls on top of the page and then a tablix, if I have 10 rows or more, whole tablix repeated and span across pages but row can be span across two pages (end of one and begining of another) 
How can I span this tablix on multiple pages without any row expanded across two adjacent pages

Cloning/Moving webpart pages with existing webparts


Hi All,       

        We need to support clone/move of the webpart pages with pre populated webparts. We have our custom webpart page layout. Users can create webpart page using our custom page layout and can add webparts init. On cloning of the webpart page we just read the file(webpart page) from the document libary and saving it with different name in the same document library. But the cloned page does not retain the webparts added to it. The user can view only the empty webpart page layout.

Please suggest me how to move/clone the webpart page with the existing webparts.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend