.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

Property defined in page template

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

Can I create property for page template and edit it's value for pages based on this template? I need to vary js code behavior for different pages.

I have no ability nor to install web-parts neither write server-side code. Only standard web-parts of SP2010 are allowed.

View Complete Post

More Related Resource Links

creating different sub page design template in sharepoint website


I know very little about sharepoint and have outsourced the design of a master page and sub page design for a new website using sharepoint. i received a site master file with all of the necessary images and the home page works just fine. However the file i received for the sub page design template was an ASPX file with the following instructions:


Here I enclosed the inner page layout file. You upload this file by using following instructions. you can change & edit the blue menu section in the master page itself. If I change into modifiable section you need to add the menu in each and every page, otherwise it will show as empty block. Please let me know your comments.


Steps for uploading inner page layout page.


1.Select the Site Actions button and click on Site Settings->Modify All site settings

how to include template in master page


Hi! I am new to asp.net... i hv downloaded some templates for my master page but dont know how to incud them in my website... plz help..


Where is StartPage.cproj : Custom Start Page Project Template


I am reading through Wrox Professional Visual Studio 2010.
In Chapter 3, there is an example of how to customize and extend the start page.

So he wants you to copy the files from C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\StartPages\<Culture>
C:\Users\<user name>\Documents\Visual Studio 10\StartPages. He say you may need to create this because it may not exist by default. So I would just copy the files into:
C:\Documents and Settings\Sam\My Documents\Visual Studio 2010\StartPages and work from there right?

Then he says double click StartPage.csproj to opent the WPF project in Visual Studio 2010.
But StartPage.csproj simply does not exist anywhere.

I have installed Visual Studio 2010 sdk and the Custom Start Page Project which shows up in extension manager.
I just can't figure out how to use it.

I am on Windows XP.

In a style template, express a property in terms of the controls properties it is applied to.

Hello,   In the style template below, which works fine, I'd like to express the "Points" property in terms of the applied to controls "Width" and "Height" properties.  As you see, the "Fill" property is expressed in terms of the "Background" property the template is applied to by means of Fill="{TemplateBinding Background}".  The following does not work:   Points="0,({TemplateBinding Height} / 4)  ({TemplateBinding Width} / 12.5),({TemplateBinding Height} / 4) . . ."   Is what I'm looking for possible, all in XAML, no code/converters? <Style x:Key="FolderButton" TargetType="Button"> <Setter Property="Margin" Value="2.5" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Polygon Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" Points="0,5 4,5 6,0 23,0 25,5 50,5 50,20 0,20"/> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> </ControlTemplate>

Creating a volume control slider/setting one template property based on another

So, what I want to do, is to make a volume control that looks like a right angle triangle with the 90 degree angle on the bottom right, and then when you click on it, the area to the left of the selected point is shown in a different color.  In other words, I've created a slider with the right background, what I can't do, is work out how to show the selected area by filling in the triangle.  I have worked out how to bind the height of my triangle on the left to the value of the control, but right now, the rate of rise is exactly half of what I need it to be.  I need to know how to change the template for the area to the left of the selection ( which is the repeat button ) so that the background is twice the height that it is right now.  No matter what size I make the slider, the area is always 1/2 the size it needs to be, so I am sure if I could get it to double inside my template, it would work fine. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">       <Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">         <Setter Property="SnapsToDevicePixels" Value="true"/>         <

Adding a custom control to the SharePoint 2010 Team Site Wiki Page Template ( wkpstd.aspx ) programm

Topic This is maybe my last post about the Team Site Wiki Page customization with the aim of exceeding its limitations. This time we are going to customize the unique template ( wkpstd.aspx) by replacing the control that renders the editable content by a custom one. In this post example, we will take advantage of the use of this custom control to render not editable additional contents, for instance, a header and a footer that could be the same for a specific Wiki Page Library. Of course, we are not going to really customize the template, but we are going to use a delegate control to replace the control at runtime. Here are the screen shots of the result: We can see a non editable Header and Footer on the Team Site Wiki Page In edit mode these additional contents are not rendered, but we can add new content as usual And of course, after having saved the page, the new content is rendered wtih the non editable Header and Footer. Steps required   If you look at the Team Site Wiki Page template, wkpstd.aspx, you can see the control that is rendering the editable content/ <SharePoint:EmbeddedFormField ID="WikiField" FieldName="WikiField" ControlMode="Display" runat="server" /> We are first going to create a custom EmbeddedFormField control Then, we are going to use a delegate control to replace the native EmbeddedFor

Accessing a public property of a nested user control in a master page from a pages' user control

Hi  I've got a web site that has a master page and that master page (mpMaster that has a user control (ucControl1) which has a sub user control (ucControl2), this user control has a property which accepts a value. Now, I have a page that uses the master page and on this page I have another user control (ucPageControl), I need to  find a way of setting the value in ucControl2 from ucPageControl. Is this possible at all? Many thanks Ed

Binding UserControl property to Page property

So what I'm trying to accomplish is this <uc3:UserControl ID="UserControl 1" runat="server" ClockNumber='<%=ClockNumber %>' Month='<%#Month %>' Year='<%#Year %>' />The user control has public properties named accordingly and the page has protected properties accordingly which I've verified have the desired values.For some reason the values are always empty strings or 0s in the usercontrol, no matter what the page property is.Thanks for any suggestions

Creating custom property on derived Page

I am attempting to accomplish the following during the creation of a Page derived from DerivedPage: <local:DerivedPage xmlns="..." xmlns:x="..." xmlns:local="..." MyProperty="My Value" Title="My Title"> ... </local:DerivedPage> You'll notice an extra property MyProperty in there. The code-behind is like this: class DerivedPage : Page { public string MyProperty { get; set; } ... } When I execute this, I get a null reference in InitializeComponent() when I create a Page derived from DerivedPage. I also tried making MyProperty a dependency property.  But I get the same results. How can I create a property for my new base-class that's set in the markup of my derived class. Thanks, ...Matt

The Group Work Site template has the "What's New" web part on it's home page and I have the follow


I can't find that web part as something I can use elsewhere? As in, I can't add that web part on other pages made even on the same site. What would be ideal is to have that web part available to add as needed to other sites/pages of course. As it stands, for me it seems the only place I can use that web part is on the home page of a new "Group Work Site", i hope that I'm wrong. I've tried exporting the web part, but the importing does nothing when trying to import it to other sites, of course other 2010 sites. Please let me know how I may add that web part to my available to use web parts please.



not able to set custom property of web part on page load


I am not able to set the custom property of the web part on page load.

It gives me exception if i try to get or set that property but i can still access other inbuilt property of the web part and can display them on the page.


I am using sharepoint designer and MOSS 2007.

Custom Page Template (List.aspx) - one to many relationship


Hi, I have two tables which is Customer and Customer Details table, with one to many details.

Is there possible to show Child table's column in (done in one GridView) Customers/Lisp.aspx?

What's the "right" way to create a site template and inherit a custom master page?


Correct me if I'm wrong, but in 2007 whatever masterpage you had selected was saved in the site template and was re-created when a new site was created from said template.

It occurs to me that it's different in 2010.

Custom master pages from a site template aren't inherited and they don't keep the specified value when you ask it to before creating the template itself.

So, what's the "correct" way?  What's the difference in making a site template using a blank site or publishing site?

Here I thought I'd be able to make a site template and move on to my next project.

Thanks in advance!


How to Make a custom property or a page persist across postback



As the title suggests, I have an object to hold some specific state information in my web application - I pass it back & forward between pages by making it a property of a basepage which works fine, but I lose it on postback.

Is there any way to persist this property without manually adding & reading it again from viewstate?



Passing a user defined type property to WCF contract



i have a class with a user defined type as follow.

[DataContract(Namespace = "a.com")]
  public class Order : IOrderDescription, INotifyPropertyChanged
    public static OrderLimitations OrderLimits { get; set; }
    public OrderLimitations ThisOrderLimits { get; set; }
    public OrderAlgorithmDescription AlgoDescription { get; set; }

 [DataContract(Namespace = "a.com")]
  public class OrderAlgorithmDescription
    public OrderAlgorithmName AlgorithmName { get; set; }
    public DateTime UTCStartTime { get; s

Page layout template examples



I'm still learning to design my own custom page layouts especially liquid layouts expanding the full browser window width.

Is there a site anywhere that has free downloadable page layouts or examples how to develop different designs?

Page.Validators property


Hello ,

I have the following problem:

Here is the server side code :

 void Page_PreRender()
            foreach (RequiredFieldValidator valcontrol in Page.Validators)
                WebControl assControl = (WebControl)Page.FindControl(valcontrol.ControlToValidate);
                if (!valcontrol.IsValid)
                    assControl.BackColor = System.Drawing.Color.Gray;
                    assControl.BackColor = System.Drawing.Color.Violet;

in the client side code I have three Requiredfieldvalidators.I will write the code for one of them in order to give you an idea:

ControlToValidate="txtagrilevel" />

When i run the page,I get the following error pointed on the line:

 assControl.BackColor = System.Drawing.Color.Violet;
The error message is :

Object reference not set to an instance of an object.

I would appre

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