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


Top 5 Contributors of the Month
Kaviya Balasubramanian
Imran Ghani
Post New Web Links

Show a list on two different websites

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :C#
 

Hi guys.


I'm in need of a way to make a list available on two different websites in the same site collection.

Say I have a list in either one of the subsites or maybe in the root of the site collection, how can I make it available on BOTH subsites - and be able to both view and manipulate the elements in the list on both subsites?

It's important that the data is concurrent on both subsites, so I can't use the "List template" thing :)

 

Thanks :)




View Complete Post


More Related Resource Links

Is it possible to show the displaying name instead of value in list?

  

Hi,I just created a custom field type to show all the users of the site.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Web.UI.WebControls;

namespace WSS.CustomContentFields
{
  public class UserFieldControl : BaseFieldControl
  {
    protected DropDownList ddlUsers;
    protected override string DefaultTemplateName
    {
      get
      {
        return "UserFieldWebControl";
      }
    }
    public override object Value
    {
      get
      {
        EnsureChildControls();
        return this.ddlUsers.SelectedValue;
      }
      set
      {
        EnsureChildControls();
        this.ddlUsers.SelectedValue = (string)this.ItemFieldValue;
        
      }
    }
    

    protected override void CreateChildControls()
    {
      if (this.Field == null || this.ControlMode == SPControlMode.Display)
        return;
      base.CreateChildControls();
      this.ddlUsers = (DropDownList)TemplateContainer.FindControl("ddlUsers");
      if (ddlUsers == null)
        throw new Exception("Error: cannot load .ascs file");
      if (!Page.IsPostBack)
      {
        SPSite siteCollection = new SPSite(SPContext.GetContext(System.Web.HttpContext.Current).Site.Url);
        SPWeb site = siteCollection.OpenWeb()

Consistent navigation for list which is available in several sub websites

  
As far as my SharePoint knowlegde goes a list is deployed to a certain location like your root site. If you got a sub site and you add a link to your list to the quicklaunch navigation you're redirected to your root site. You lose track of where you've been before. Is it possible to have a link to one list in several sites (in one site collection) without being redirected to the root site everytime you click on a link? I would love to create a custom siteMapProvider if that's what I need to do, but I could really use some hints and help how to start on this topic.

How to show list contents in two different sites

  
hello, how can i show list items in a two different sites..if i have a announcement list in my main site how can i show the  contents of the same list in another site ? i know we can use the webpage viewer but its not a good choice i want to show the list as same as it displayed on my source page...thanx

Show total items for GridView in List.aspx or GridViewPager

  
Hi, Is there a solution to show total items in Grid View in List.aspx or GridViewPager Eg. Record: 1 - 20 of 231 

Show value from Lookup List inside a view

  
I've got a Categories list, a Product list with a Category field defined as lookup value. The Product list is used in an OrderLine List. How can i show the category value from the selected Product in the OrderLine view? I tried calculcated columns, but they don't work on lookup columns. Would this be possible by creating a custom FieldType? (without performance problems, i assume there's a reason why calculated values don't work on lookup columns) Thanks Marco

Show and hide items in the list as per permission (depend on the permission)

  

Dear all,

In sharepoint 2010

How I Show and hide items in the list as per permission.

i.e the user can fill the most fields in the list and we need to prevent him to see manager's fields in the same list.

Thanks


How to show list of dates a vehicle wasn't driven.

  

I have a table (ConsecDates) containing 1 field (Date). That table has a listing of consecutive dates for approx 2 years in it.

I have another table containg the Invoices for trucking jobs. This file contains an Invoice date field.

I need to know which dates an individual truck did NOT drive.

Is there any way to draw that information out of the Invoice table ?

 

Thanks in advance

tattoo


how to make webpart only show top list item?

  
Our office is new to SharePoint (including me!).  On our new SharePoint intranet I want to create a SharePoint Tips list.  I then want to put a WebPart on the home page that only shows the most recent tip added to the list.  I can't figure out anyway to configure that.  Thanks for suggestions.

Column to show count of attachments uploaded for each List item in MOSS 2007

  

We have two requirements:

First, we need a column which shows the count of attachments that are for uploaded each item, the list structure is like below:

No. Of Files Attached Title Category Description Owner

Making foreign key entities not show on List screen

  

Hi,

I have the following db design:

Table: Person

PersonId

LastName

FirstName

:

Table: Student

PersonId references Person table

Grade

School

 

On a list screen of Student, the Person is showing up as a dropdown search criteria.  Is there a way to remove the person search criteria from the List Screen?  I am using Visual Studio 2010.

 

Thanks,

TinaC99


Basic List Definition steps - cannot get columns to show up in New, Edit, etc.

  

Can someplease explain (since the MSDN docs don't) all the necessary stuff required to make a custom List Definition?  I'm trying to make a List Definition and in the schema.xml I've added some custom columns, as well as existing site columns, and I cannot get anything but the default items (from VS creation itself), like Title, to show up.  Some things I've tried:

1 - Yes, "ShowInNewForm", "ShowInEditForm", and "ShowInDisplayForm" are all set to True

2 - I've tried making an inline Content Type for these new columns (i.e., not a new ContentType element, just inside the Schemal.xml file)

I cannot ever get the custom columns to ever appear on anything other than a View.  Also, how the heck do you hide/get rid of the Title column if you don't need that?

 


data view web part unable to show data from list in subsite

  

Hello all,

In 2007, I never had any issues with doing this. In 2010, I created a web part that looks at the Pages list and pulls a few columns and as long as I am within the site, it works fine. But I need to call information from the Pages list in a subsite and display that information on the parent site default page.

In 2007, I made this work by changing ListID to ListName and DefaultValue="Pages" and then change the WebURL to DefaultValue="/SubsiteName/" then place it anywhere and it found it. Now if I change the ListID to ListName and default value to Pages I get an error that the web part cannot be imported. if I try using the actual ListID and change the WebURL to the subsite, I get an error that the web part is looking for a list that does not exist. This worked so easily in 2007.

Any one able to tell me what's going on? Or have a solution?


Metadata properties set in list item, but don't show up in the DIP.

  

Hi folks,

I'm creating a document programmatically on the server side and using SPFileCollection.Add(...) to create it using the binary contents and a hashtable of the metadata properties.

This works great in SharePoint.  The SharePoint list item picks up the metadata properties and a new document item is created in the library with the proper metadata for all of the fields.  If I view the properties or go to edit the properties in SharePoint, all of the metadata is correct.

However, when I open the document in Word, it seems that none of the managed metadata fields (taxonomy field types) "stick".  The values are only for the managed metadata fields.

In SharePoint, if I change any of the fields and do a save on the list item and then open the document, the taxonomy fields "stick" when I open the document again.

I've opened up the document to view the XML and it seems that the custom properties XML doesn't change from pre-update to post-update.

I've also tried calling SPListItem.SystemUpdate(...) and SPFile.Update(), but this has yielded no results so far. 

So in summary:

  • All fields except for managed metadata fields "stick"
  • All fields show up fine in SharePoint in view and edit mode
  • Managed metadata fields are blank when Word document is open

data view web part unable to show data from list in subsite

  

Hello all,

In 2007, I never had any issues with doing this. In 2010, I created a web part that looks at the Pages list and pulls a few columns and as long as I am within the site, it works fine. But I need to call information from the Pages list in a subsite and display that information on the parent site default page.

In 2007, I made this work by changing ListID to ListName and DefaultValue="Pages" and then change the WebURL to DefaultValue="/SubsiteName/" then place it anywhere and it found it. Now if I change the ListID to ListName and default value to Pages I get an error that the web part cannot be imported. if I try using the actual ListID and change the WebURL to the subsite, I get an error that the web part is looking for a list that does not exist. This worked so easily in 2007.

Any one able to tell me what's going on? Or have a solution?


show search result as default parameters when initiation of business data list

  

Hi,

I want to show search result as default parameters when initiation of business data list.

Is there any solution to solve this problem. Thanks.


If Dropdown list value is available in the binded gridview in any row , then i need to show a messag

  

Hi ...
If Dropdown list value is available in the binded gridview in any row , then i need to show a message ALREADY EXIST !
I have a gridview which has 3 columns and binded from database on pageload.
In the same page i have 3 dropdown list which is also binded from database.

How to show a section name in a filter list which is two level apart from a primary key

  

Hi All,

I have three tables, table1, table 2 and table3.

Table1 has PK_T1 and other tables also have PKs respectively.

Table1 has a foreign key relationship with table2 and tables2 has a relationship with table3.

Let's say Table1 has transactional records and it has DeptID and table2 contains department info with a UserID field.

Now, the table 3 is a user master.

When I view Table1/List.aspx, how can I show user names in the filter list?


Best regards,


Categories: 
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