C# - To Apply Default.master Of The SharePoint Site To Aspx Page?
Mar 7, 2010
I am using SharePoint Server 2007 + C# + .Net 3.5 + VSTS 2008 + ASP.Net. And I am using collaboration portal template.
I am developing a custom aspx page and put it in _layout folder of a site and I want to apply default.master of the SharePoint site to this aspx page. Any samples about how to achieve this goal?
Using Visual Web Developer 2010 Express. I was used to creating a web app anytime and I would get a default page for starters and be happy. But today I find that when I pick either the ASP.NET Web Site or ASP.NET Web Application templates I get site.master and a bunch of site admin files that I don't want. Alternately when I select the empty versions of those templates, I get almost nothing at all. An almost empty web.config page and no Default.aspx page. There is nothing magical about having a default.aspx page in place, but it is an indicator of a change when I can only get a virtually completely empty website or a website with a bunch of bells and whistles I don't want.
Also, for some reason, when I create a new app or website as just noted, in the Solution Explorer I get aspx.designer.cs files showing as well as web.config files for both debug and release. Somehow some settings and templates must have changed, or am I missing something here? How can I get my settings/templates to go back to the way they were?
I am working on Themes. Till now I can sussessfully change the Single Page theme when my user logs in.
I Used :
Page.Theme = "RedTheme";
and redirect it.
But if i take master page then i unable to apply the selected theme to all pages. My User can able change theme now. But only for single page. How to apply for all pages?
First i had taken Default.aspx Page .after that i added master page to my project.Now i want to include this master page into default.aspx page I was mention master page attribute in Page directive of defult.aspx.
Now problem is i am not able to Get the attribute of <asp:contentplaceholder>.
I got a Master page and nested master pages in the subfolders.
Top Level Master page
Second Level Master page inherited Top Level Master page
Third Level Master page inherited Second Level Master page
However, changes (i.e. new images & alt. name) that I made in the Top level master page did not apply to the second or third levels.My webpage has a correct front page but not in the sections. How can i correct this ?
Is it possible to inherit a sharepoint master page(as a parent) in another application's master page which will be treated as child (i.e. after integrating that standalone application with the sharepoint application)? I am totally new to Sharepoint..
I just recently upgraded a site from 3.5 to 4.0. After editing the web.config, creating a new app Pool in IIS, configuring the site to use 4.0 and the new app Pool, I can no longer browse to any default.aspx page without explicitly typing 'default.aspx'. This site was originally written for .NET 2.0, upgraded to 3.5, and finally updated to 4.0 a few days ago.If I try to browse to http://[mysite]/ I see the following error: Server Error in '/[mysite]' Application.The resource cannot be found. Description:TTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.Requested URL: /Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1However if I browse to http://mysite/default.aspx, everything works fine.
If I undo all the changes made to the web.config, and revert the site back to the app Pool used for 2.0/3.5 the site loads and runs fine. Restarting IIS will solve the problem for an hour to a day, but the issue will always come back. Other sites running on our sever which were not originally made in 2.0, but 3.5, have upgraded to 4.0 without this issue.
I got a Master page and nested master pages in the subfolders. Top Level Master page Second Level Master page inherited Top Level Master page Third Level Master page inherited Second Level Master page However, changes (i.e. new images & alt. name) that I made in the Top level master page did not apply to the second or third levels. My webpage has a correct front page but not in the sections.
As part of our branding of Sharepoint 2010, we'll be modifying some custom HTML menu's based on database and user permissions.
To do this, we are looking at the use of code-behind in a custom Sharepoint 2010 master page.
The only reference I can find to creating a code-behind file for sharepoint 2010 is this blog post series. The issue I have with this is that it's using the Visual Studio 2010 Sharepoint integration, which has the genius feature of requiring a local instance of an entire Sharepoint site. This isn't something that I can do/get.
This is the MSDN for code-behind master pages in Sharepoint 2007. I'm assuming it's similar but I can't find anywhere that describes it as such.
Is deploying a code-behind for a custom master page the same as in Sharepoint 2007 or does anyone have any experience doing this?
I've more than 12 pages without any master pages applied to them. these pages have heavy javascripting and loads of controls on them. now i require to add these pages under a master page. how can i achieve this with minimal of effort?
A client of mine uses SharePoint to manage its websites, and recently asked me to build a small website for them using ASP.NET, which they would then implement via SharePoint.My skills with ASP.NET are intermediate, and I have no experience at all with SharePoint.I created a master page for the site, as well as the individual pages, but the client is telling me that they also need a page layout template in order to view and manage the site via SharePoint.
I'm starting with ASP.NET MVC (1.0). I have a problem to resolve. I have developed a web applicaton (an application of articles like e-commerce) with a head (logo and menu). I have defined the head (logo and menu) in the Master page (site.master). Now, I must display the number of articles in the head in a field (like the number of articles in the virtual basket in the e-commerce). I can read the number of articles in the data base (in the controller), but i can't integrate it in the master page.
My computer system froze on me, the mouse froze, cntrl-alt-del, did nothing, so I reset it. Did a disk check, and now everything seems fine except for my master Page html code which I was in the middle of editing when it happened. The VB code-behind file is still ok, the designer file still shows ok with all of the controls in it, but I can't get into desgn or source view. It just opens and gives a whole page of hesixecimal code such as as:
I have a master page to apply to all my pages, the master page is doing its work however, it seems that is unable to resolve the CSS file address for pages I have in child folders.
I have a set of folders like this:
[code]...
In the code above I tried <% ResolveUrl("~/StyleSheet.css") %> but didn't work, it works while in the same folder but not on the childs.
EDIT: Just to clarify my CSS file is on my Root Folder not on the childs
i have created a custom aspx page whithin my sharepoint site with a sql server connection to a database on that server to select data when i view the page it works but when another user tries to view it it gives the following error :Server Error in '/' Application. Login failed for user 'GRINCORGuguK'.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'GRINCORGuguK'.Source Error: The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:2) Add the following section to the configuration file of your application:Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario. tack Trace:
[SqlException (0x80131904): Login failed for user 'GRINCORGuguK'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +248 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
I am using spgridview to show the files and folders of document library in an aspx page. Now i want to display the files and folders along with icons in spgridview.
Here is my scenario.In default.aspx page user selects the country, state, city from drop down list, and store them in cache for further use. but when other user open the web site from other computer it shows the same country, state, and city selected by user 1. Is there any problem related to cache? I have stored data as following.
cache["ctryID"] = ctryID;
cache["stateID"]= stateID;
cache["cityID"]= cityID;
I want to show default country, state , city at page load of default.aspx
after the upgradation process, we didnt get above the URLs. i have checked site default page settings (in IIS "Document" default page settings), and default.aspx page is shows under settings.
the site url "<domainname>.com/" also does not working. if we call "<domainname>.com/default.aspx" then worlking.
I have a master page that has a text box at the top with a couple of words in it. Below that I have a horizontal menu and below that there is the content place holder.I wish to set a default background color on the master page so that each other web page that uses this master page will inherit this background color.How do you do set a background color on the master page?I can't seem to select the background to set a default background color because the controls I have placed already.