.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

Pages showing different static content

Posted By:      Posted Date: October 10, 2010    Points: 0   Category :ASP.Net

I have two aspx pages that both use the same master page. Master page is more or less the default from VWD 2010 web application (Site.Master).

So both page A and B have the same:

<%@ Page Title="Sample web app" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="PageA/B.aspx.cs" Inherits="WebApp.PageA/B" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">,
    <link href="Styles/Table.css" rel="stylesheet" type="text/css" />

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

The difference when shown in web browsers is (tested on Chrome and Firefox) that PageB looks like it has one more blank row/space on top of the page. How is this possible?



View Complete Post

More Related Resource Links

Application Vs. Content Pages in SharePoint

SharePoint has two types of ASPX pages. One type is the application page, also known as a _layout page. The other type of ASPX page is a content page, also known as a site page. Each of these page types is stored in a different location in SharePoint. When developers create custom ASPX pages, they must decide on the page type.

Content and Structure Report not showing all items

I have an environment where the Site Owner is not seeing all items pending approval when they access that view from the root node in the Content And Structure section.

We can see pending items in this view if they access some of the lower level nodes in the tree structure, just not from the top node.

I've noticed that the second level nodes are not inheriting permissions from the root node, but I'm not sure if that is relevant. I've also checked the CAML for the Pending Approval view and it has not been altered in any way.

Any ideas?

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?

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

Developing common content pages that can be hosted at the Web application or TLS level and can be sh

We are working on a Publishing site and planning to provision each client as a sub-site under the top level site (TLS). All of these sub-sites will almost have the same web pages and based on the client specific requirement they can customize these pages if needed. To meet the above requirement: I want to develop common content pages or application pages with the publishing capabilities and host them at the TLS, making these common pages available for all sub-sites under the TLS with the following requirements. ·        Sub-sites will not have any of these pages on their own and there would be only one central copy of this common page at TLS. ·        The sub-sites should be able to access these common pages in their context that means using the sub-site specific Master page & Themes. ·        When there is a specific customization is required such as adding a different web part, or updating the HTML data on the page, the common page will be edited in the sub-site and eventually making its own copy of the common page and resulting breaking apart from the common page for any future changes. ·        When the user edits the page he should be alerted that customizing this common page will make a local copy an

How to develop Common Content or Application pages in Sharepoint 2010, with respect to the customiz

  I have a top level site and subsites (which might be around 10). Where as the top level site represents a common landing page and each sub site represents a client site to which user will be directed upon login. This is a PUBLISHING web site. I need to design to start with common pages across all clients and if there is a need let the client to customize the common page accroding to their need. This is a PUBLISHING site so all these common pages should have Web parts zones with authoring capabilities. What is the best way of achieving this?    

Repeating table not showing content following a rule refresh

Background info: I have a form where I populate employee info from the GetUserProfileByName ws. From there I populate its manager info from another web service call (seperate data connections).  Once the manager is populated, through rules, I'm populating the first approver. All this is done at form load through rules. The approvers node is defined as follows and is displayed on the form as a repeating table:  participants (group)    approver (repeating group)       ApproverName       ApproverLogin       ApproverEmail Problem: The repeating table is not showing any content even though I'm using an alert to show that I do in fact have one row in there. As a side note, I know the table is working because if the user elects to delegate approval to another user (through the people picker), the table shows these approvers correctly.  Anyone as any clue what I'm doing wrong? Thanks!    

Im trying to print the content of a listbox1 but the printing is false so all the pages coming out f

 ManagementObjectSearcher mosPrinter = new ManagementObjectSearcher("SELECT * FROM Win32_Printer");                 foreach (ManagementObject moDiskete in mosPrinter.Get())                 {                     foreach (PropertyData p in moDiskete.Properties)                     {                           // listBox1.Items.Add(p.Value);                         listBox1.Items.Add(String.Format("{0}: {1}", p.Name, p.Value == null ? "NULL" :myprint.DocumentName=p.Value.ToString()));                      //   myprint.DocumentName = p.Value.ToString();                     

master pages - how to access content page from master page?

Hello,I have a master page setup that is used throughout my site that is basically a header with a menu. I recently added a textbox and a button to this master page which is to be a quick search box that is available anywhere in the site. When a user enters text into the search box and hits the button, I need to load the actual content page which is used to search and show search results (which also uses this same master page), and have the text entered available so the search can be triggered automatically. Again, this search text box and button is now in my master page so it could be  triggered from anywhere in the app... it serves as a convenient way to do a basic search from anywhere in my app, without having to first navigate to the actual 'search page' that already exists.  You can also navigate to the actual search page, which uses the same master page, where there is many more search options.I'm thrown off by the master page arrangement, which I have not used until this project. What do I do?

View All Site Content Showing the wrong number of items

NOTE:  Similar post also had no answer: http://social.msdn.microsoft.com/Forums/en-US/sharepointecm/thread/f775ba0d-648f-4be3-9017-78539915b281/ I am the Site Collection Administrator/and also tried logging in using Farm Account.  I go into View All Site Content and I show 15 documents.  When you actually go to the All Items view (and I double-checked, no filtering), you only find 9 documents.  Versioning is not turned on.  I am a developer, so I also used the Web Service to try to troubleshoot.  The Lists.asmx web service shows an Item Count of 15 using the GetList method.  However, using the GetListItems method, the item Count reports 9 items, which is what I see in my browser. Is there an stsadm command that I can run that will "true up" this number being reported in View All Site Content? Thanks in advance. - Update -  MOSS 2007 v 3.0 server farm.

flow doc reader showing 2 pages on 1 page view mode

Got a question about a flow doc reader. I'm using it for a report page and its main purpose is its scroll mode.  However, I'm wanting to use its 1 page mode for a print preview kind of thing.  If i have the flow docs page size set to roughly 8.5" x 11" the one page mode displays it perfectly to how it would be printed.  If i change the page size to a landscape format roughly 11" x 8.5" the doc reader crams everthing in on one page. Question is: Can you modify the doc readers one page mode to display pages as they would be printed? If not is there a way you can set up a print preview dialog with the flow doc?  Thats equally as good. Another random question.  When I call the flowdocreader.print method it displays a print dialog.  Problem is the close button on the dialog lines up with the print button on the toolbar.  If you try to close the dialog it clicks through the print dialog and hits print again.  This causes an infinite amount of print dialogs to appear and you have to close each one of them with cancel.   Is there a way to set focus to the print dialog or change its start up postition. Any feed back will be greatly appreciated.

Content Organizer for Pages



I am trying to use the 2010 Content Organizer feature to route documents within my Pages library.  This is actually MS's recommendation for large Pages libraries (http://technet.microsoft.com/en-us/library/ee721053.aspx).  At first I wasn't sure that this would work for me because I didn't think the content organizer feature would work on anything but document content types, however I have seen it work on a few of my pages (custom content type inheriting from Page) and Page is listed as a supported content type  (http://www.sharepointanalysthq.com/2010/05/content-organizer-routing-limitations/). However, I am seeing some inconsistent behavior of this feature.

Here is what I have set up:  Pages library with only my custom content type accepted (inherits from Page).  I created a few simple rules to route content into folders within the Pages library based on a site column used (and required) on this custom content type.  I have a few different page layouts that can be used.  For each of them, the custom content type is the only supported one.  There ar

help me on master pages & content place holders.


Hello sir, i am new to this forum, so please excuse me on my mistakes. I have a master page with asp TextBox and a Button also with 2 ContentPlaceHolders(ContentPlaceHolders1 & ContentPlaceHolders2). The project contains 2 WebForms Default.aspx & Search.asp. The purpose is to use the button click event to search records & place the results in the content page Search.aspx in ContentPlaceHolders1. The search is working fine but the problem is that the results get placed on the top(instead in the ContentPlaceHolders1) with the master page controls going down on the Search.aspx page. Please help me on this. I tried a lots of things like changing search page events to Page_LoadComplete etc etc but nothing worked.

My Default.aspx.vb code is as:

    Public Sub mySearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mySearch.Click

        Response.Redirect("Search.aspx?nameA=" + Keyword.Text)

    End Sub

End Class

My Search.aspx page is:

Secure Static Content


Hi Everyone

We have a 3rd part application that consists of HTML reports/static images/gifs etc (different file types that are not known upfront) that are pushed periodically through a trusted source to a directory that is under our application (ASP.Net 2.0) virtual directory (IIS 6).

In our app we just need to display the first html file to each report (the html knows where it has it contect) etc. So a simple JS Iframe did the job.

However if someone knows the Virtual directory path (http:/App/Directory/Id1/Id2/....) they can browse to the images that can contain confidential data.

Is there any way of securing the files on the folder??

Thanks in Advance



jquery not working in content pages and debugging jquery


Hey! Friends

        Please provide me some sample code to work with jquery in content pages. For example my jquery code for validating username availability works in web form but not in content page.

Thank You.

using jquery in content pages


i have found out a way to find controls on content pages by using

var txt = $('input[id$=TextBox1]'). But how to access html elements like "<p>" tag and others in jquery when the html elements are in content page only.


CollapsiblePanelExtender Onload when using Master/Content Pages



I'm wondering if anyone else has run into this problem; I have a collapsible panel extender to which I need to add some event handlers via javascript on page load: 


This was working perfectly...*until* I split the page into the Master/Content page scenario.  The control, the scriptmanager and the javascript are all declared in the content page right now. 

Suddenly, all my client side code comes up as the object being null or not found at the window.onload event.  After 3 days of chasing this dragon, I added a test button which calls the same functionality which should run onload and when clicked, it has no trouble at all finding the object *after* the page has fully loaded.  I've looked into almost all the posts on the web about this and I've found the question...but not the answer.  I've played with the recommended fixes dealing with BehaviorID...the ClientID...the ctl100_control_object and ctl100$control$object names and I'm still dead in the water.

Somehow, I have to get this code to run at the page onLoad event.  I'm gratefull for any suggestions at this point!

Thanks in advance!

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