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

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

Hide / display page layout columns for different users

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :SharePoint

I'm looking for a way to hide some columns of a page layout so they will be shown only to specific audience (for example hide the "created by" column so some users won't see it). Any suggestions?


View Complete Post

More Related Resource Links

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






Variation label in a page layout and Translated Columns



Can any body elaborate on this two terms in publishing sites.

1: Variation label in a page layout

     When i edit the page layout from browser interface of publishing site with variation, there is one field called "Variation" where user

     have to select the variation label from a list.

2: Translated Columns

     Don't know what is this, i try to google a lot but not found any information.


Thanks in advance

Regards Sandip Patil Sharepoint Developer http://www.worldofsharepoint.com

have print friendly page, want to hide columns of gridview

using vb.net/asp.net 2005I have linkbuttons calling the javascript function at the bottom of this post to print out the contents of a div and this is working ok but theissue that i have is inside the div is a gridview that displays links and another text column (among other colums) and I would like tohide the links and the text column next to it using css.Has anyone done this?btw, here is the javascript print function# function printThisDiv() # { # try{ # var sOption="toolbar=yes,location=no,directories=yes,menubar=yes,"; # sOption+="scrollbars=yes,width=750,height=600,left=100,top=25"; # # var sWinHTML = document.getElementById('dvTheDivIWantToPrint').innerHTML; # # # var winprint=window.open("","",sOption); # winprint.document.open(); # winprint.document.write('<html><body>'); # winprint.document.write(sWinHTML); # winprint.document.write('</body></html>'); # winprint.document.close(); # winprint.focus(); # # }catch(err){ # txt="There was an error on this page.\n\n"; # txt+="Error description: " + err.description + "\n\n"; # txt+="Click OK to continue.\n\n"; # alert(txt); # } }

Admin page to manage users, need help with adding roles to this layout


Currently i have a page that has the following  code / layout.. as it is now, i am only displaying the roles and they cant be edited. Since this would be the admin page to manage users, what i would like is to have the Roles display as a checkbox list that shows all our roles and have the roles that the user is assigned to checked. Can that be done, if so are there any examples or tutorials i can review?


            <asp:GridView ID="GridView1" runat="server"  AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="UserName" DataSourceID="ObjectDataSource1" AllowSorting="True" Width="80%">
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
                    <asp:CheckBoxField DataField="IsOnline" HeaderText="IsOnline" ReadOnly="True" SortExpression="IsOnline" />
                    <asp:CheckBoxField DataField="IsLockedOut" HeaderText="IsLockedOut" ReadOnly="True" SortExpression="IsLockedOut" />
                    <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly=&quo

allow users to select page layout


within my app, I'm allowing the users to selects their styles for their page, now I want to take it a step further and allow them to select a page layout, (nav - top or side, headers, footers, etc) I have several user controls predefined with different layouts and I show those layouts in a dropdown, now, my question is, how can I load the new layout for a preview to the user?

My page is using an updatepanel for the css changes, now I want that same updatepanel load the template with their selected layout. I looked at updatepanel.LoadTemplate and LoadControl and with no luck. any suggestions on how to acomplish this?



Get Page Layout to check whether a field is filled in and display

I have a page layout that has a URL Field which users can fill in, if needed.  The field is:
<SharePointWebControls:UrlField FieldName="DetailedInformation" InputFieldLabel="Link to Plan Change page" runat="server"/>

This field lives in the Edit Mode Panel but I need to display it within the page, if the user fills it in.

The only way I know how to display fields throughout a text of the page, is to use the FieldValue, e.g.

<SharePointWebControls:FieldValue FieldName="DetailedInformation" runat="server"></SharePointWebControls:FieldValue>

Is there a way to say "if the above field is not null, then display with formatting as below" - similar to an If statement.

<p class="ms-rteCustom-hyperlink-arrow">
	<SharePointWebControls:FieldValue FieldName="DetailedInformation" runat="server"></SharePointWebControls:FieldValue>

If I put the above code and the field isn't filled in, the arrow (from the class) will display but I do not want it to.

Please note that I am using SharePoint Designer 2007 to create the page layout.

CreatePage.aspx cannot display page layout preview image


I am using a custom site template and functions fine, except that when I get to the CreatePage.aspx page, the preview image is not displayed. When I looked up the properties on that image, it was looking for the image in a location other than the place where it should.

For eg: Instead of looking for it at /_catalogs/masterpage/en-US/Preview%20Images/ArticleBodyOnly.png  it looks for it at xxx/test/_catalogs/masterpage/en-US/Preview%20Images/ArticleBodyOnly.png where xxx was an external consultant that worked on this site before me and I am new to sharepoint. The only scenario when this doesnt happen is for the DefaultPageLayout.png file.

This problem seems to repeat everytime I use this site template. When I open up the sites with these templates on Sharepoint Designer, I can see all the preview images over there. For some reason, the CreatePage.aspx is not looking for the images in this location and looks for it at another location.

I am really stuck with this issue, can someone please help me understand why this is happening or help me resolve this?


Need help redirecting users to personalized page


 Hi, first timer here so be gentle.


I've been able to create a cool little website, it's up and running with users logging in and out, I created roles so my administrative team can see sensitive data that's not available to regular and anonymous users.

Now they would like me to create a page specific to each user.  For instance when user A logs in they are redirected to a page that has information that pertains to user A only (like a list of their benefits/ their remaining vacation time). This page needs to be accessible only to user A. 

I've watched a ton of the videos but have yet to see one that covers this topic, any help would be great!!!





Panels messing up page layout



On a few different pages in my web app I have a scrollable panel that contains a gridview. When there is nothing in the panel display as I want it to, however when the grid view is populated with data it stretches the panel across the page which looks awful, it means the panel is partially stretched across the window but is still scrollable

Anyone know why this might be happening?



Gridview extends past edge of div and page when editing users


I have a gridview pulling all data from one user. This gridview has an edit button and when that is clicked the gridview becomes too wide for the div/screen and I get a scroll bar. Since this gridview can only have one user in it anyway is it possible to display each field on seperate lines instead?

Page layout list not displaying in page settings



I have 4 different custom page layouts in my publishing site at the site collection level. I have one site named "Services" in site collection. When i create page, i select one page layout from above 4. But when i go to the page settings of that page to change the page layout of it, i can see only one page layout which this page based on.

Problem is why all the page layouts not listing there? I checked "Page layout and site templates" settings from look and feel of Site Settings, this r set to "Pages in this site can use any layout".

Please help..!

Thanks in advance.


Sandip Patil

Sharepoint Developer


Hide documents from being access by unauthorized users.


Hi experts,

I would like to know how to hide certain documents (eg. Word, Excel, PPT, PDF) in a document libraries from unauthorized users? I tried implement Target Audience, but it doesn't work. If anyone know, i really appreciate for the guidance.

p/s: If my posting is not relevnt to the thread, please kindly move it to the appropriate places. Thanks!

Content deployment: pages not based on a page layout

Is it possible to use content deplyoment feature when pages (in page library) are not based on a Page Layout?

Can two columns have the same display names but different underlying names?


I have two columns which are set up differently. But for a display purpose and different usage, they should share the same display names but not the underlying name. How may I set them up in SharPoint?

SharePoint 2007 - Consolidating everything as feature into WSP [Content Type, Page Layout, Pages, Ma


Hello –


Overview – We are building a Mobile Web Site using SharePoint 2007. The big screen site has been already built and we need to integrate the mobile site into same site collection of big screen –


·         The Mobile site will use the existing content types of existing big screen site

·         We will build a new custom Master page

Display 'Top Queries Over Previous 30 Days' to users


In the Site Usage Reports, there is a section for 'Top Queries Over Previous 30 Days'. I would like to display this information to users. 

Is there a existing webpart for this? 
Is the data stored in a list that can be used for this purpose?


Steve Clark

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