.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

How override inheritance from Default.Master page? How override default.master function acting on ju

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

 There is this one function that i can't remove from the Default.master page because other forms in the project use it and are happy to inherit from it. But in one form it messes up the layout as it injects a line below every text box to tell the user how many characters he's typed and how near the 1000 char limit he is. For this form we dont' need or want that on every asp:textbox. How can i keep the rest of the inheritance from Default.Master but exclude or avoid or override this function acting on textbox controls in this one form?

Here's the function as given in the default.master page, fyi:


function() {var countdown = {function() {//alert($(countdown.obj).attr('id'));

countdown.remaining = countdown.max - $(countdown.obj).val().length; 

$(countdown.obj).val($(countdown.obj).val().substring(0, countdown.max));

countdown.remaining = 0;


View Complete Post

More Related Resource Links

Mysite Default Master Page



We have been using the mysite section of sharepoint for 6 months and have recently changed the default.master is there any quick way of changing all the users pages without losing anydata.

I know i can go into the Master Page library for the users, upload the new default.master and then set this as default within sharepoint designer, however this will be quite a lenghty task for me to complete for all our userbase.

Could you please advise if there is a quicker way to do this.

Retracting feature which deployed custom master page delete default.master

Hi, I am not sure if solution to this issue is already posted? I have my feature which copy my custom.master which is copy of default.master from hive to master page gallery of web. The problem is that everything works fine with feature activate and deactivate but when I retract the solution from the server. All pages except site settings page stop working saying "file not found". I redeploy the solution, it starts working again. Looks like the retract is deleting default.master as well? I have this issue in 2010 as well. Any help will be appreciated. Thanks, Kashish

Can't override a default value of a text box function

I have a text box that calculates the default value based on the values of other fields. I need the ability to override this default value and enter in a static value. The problem is when I enter in my static value and save the form, close it and reopen the form the calculated value shows instead of the static value I entered.

Any idea what might be causing this?

create page with default template from master page programmatically


hi, exactly like cms , i want to create page programmatically with this options:

1: page-name

2: add template (master-page)

and etc...

help me .thanks

error.aspx page reports that Page.MasterPageFile = ~/masterurl/default.master not ~/_layouts/simple.


This one is driving me nuts.

I'm intercepting Pages using HTTPModules so that I can change the Master Page before the page loads. This works as expected on everything except error.aspx in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS folder. Despite the fact that error.aspx specifies MasterPageFile="~/_layouts/simple.master" I keep getting Page.MasterPageFile = ~/masterurl/default.master instead!

Anybody know why this is the case?

Is there a site page default.master in SharePoint Server 2010??



I inserted a few lines of code on the wkpstd.aspx template to "show" the document library properties on each wiki page within each wiki page library. This is working fine, except that the property Document ID
is showing up on site pages as well.  I checked Moss 2007 and I foumd that there is a bpcf.aspx default page that is used to create a basic page. Is there a separate template or master page for the site pages within 2010 that i can modify?

Any help or suggestion is greatly appreciated. Thanks.


Set as default master page in Sharepoint Designer 2010 does not change pages at all


I make a copy of V4.masterpage ,rename it as myv4.masterpage, and modify it .

then right-click myv4.masterpage and choose 'set as default masterpage'.

but when i open my site, the pages don't change, and create a new page,it still the old look.


Shouldn't it do that?

Master Pages: Master Your Site Design with Visual Inheritance and Page Templates


Master pages in ASP.NET 2.0 solve a problem many Web developers have been solving on their own with a variety of techniques for years - providing a single master template for an entire site. This article covers the details of master pages, discussing their usage and implementation and how they are a natural evolution of custom techniques developers are using today.

Fritz Onion

MSDN Magazine June 2004

how to change default menu tab in master pages?



i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?


Default "area" in master pages

Is there a way to specify a default area for any content specified in a master page?  I have a global master page and a bunch of user controls (.ascx) with action links defined without regard for 'areas' - is there a way to specify the default area to use when rendering action links and the like? The problem occurs when navigating to an area; all the unspecified master page links do not link back to the default area (in my case the root). I.e., Html.ActionLink("Home", "Index", "Home") renders as "/area/home/index" rather than "/home/index". I'd like this to work for all the links defined in the master page file without needing to specify Html.ActionLink("Home", "Index", "Home"new { area = "" } Thanks in advance, Mike

modify/override properties of default sharepoint modal dialogs (ex. editview.aspx) using javascript

Hello all, I would like to know how can I modify (override) some properties of the default sharepoint modal dialogs using Javascript. Ex. the size and location of editview.aspx. I while ago I asked a question about overriding the DialogResult in the display view dialog. I got an answer from Zach which looked like this:             sb.Append("<script type=\"text/javascript\">");             sb.Append(@"window.setTimeout(function () {");             sb.Append(@"if (window.frameElement && typeof(window.frameElement.overrideDialogResult) == 'function')");             sb.Append(@"{");             sb.Append(@"SP.SOD.executeFunc('sp.ui.dialog.js', 'SP.UI.DialogResult.OK', function () {");             sb.Append(@"window.frameElement.overrideDialogResult(SP.UI.DialogResult.OK); ");             sb.Append(@"});");             sb.Append(@"}");  

Load View and Partial View (Master/Detail) with default parameter(s) ?

MVC newb.  Members view (index) that lists members that users can select to show a partial view in the same view with details for the selected member Uses jquery (Ajax.ActionLink) to call a partial view method in the members controller to then load the members detail section Works fine up to here....but I'd like to load the partial view with "member" details for a default or random member on initial load -- ie not through the Actionlink selection How do I invoke the partial view method on the initial load?  I'm sure this is basic stuff but still still getting my head around the mvc "way" Can someone point me to an example or explanation somewhere?  (not turning anything up on my searches thus far)   thanks in advance!!

How to call javascript function in master page

helloi have javascript file 'script.js' where i have writt en a function for print. but this function is working fine if i am not using master page in my report page but the question is i want to use master page for my report page where i am calling javascript function but it is not working . Do help me regarding MasterPage and Javascript function.

how to override the default popups for windows logins for guest users?


how to override the default  popup for windows logins for guest users?

So that guests will be provided with restricted access?


Master Page Inheritance



I am a new Developer , am Just started Today in Application

but I have a problem with Master Page InherItance

I make master page Item and past Index in the source of Master page Item

and Design of Master Page is Ok

but in Web page , in Source , I whrit , 





Language="C#" AutoEventWireup

Master Page Inheritance 2010


I have modified the v4.master masterpage in SharePoint 2010 on my site. When I create a new site under this site (subsite) it does not inherit the changes. I see the changes on the top site but not the subsite. Does 2010 behave different that 2007? In 2007 you had not problem telling subsites to inherit.

Provision/Add custom Layout, Master and Default pages in Site Template


I'm attempting to use the onet.xml of a custom Site Template to provision/add (same thing?) a custom Master Page, a Custom Layout page and then reference them in Configurations.

I'm having trouble understanding the steps and order to do this in properly and am getting errors where the Layouts/Master pages cannot be found.  Here is what I have now:

<Module Name="SitesLayout" Url="_catalogs/masterpage" Path="Layouts" RootWebOnly="false">

  <File Url="SitesLayout.aspx" Type="GhostableInLibrary"><Property Name="Title" Value="AEP Sites Layout Template" /></File>


<Module Name="AEPMasterPage" Url="_catalogs/masterpage" RootWebOnly="false">

     <File Url="CustomMaster.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="true" />


<Module Name="DefaultFunctional" Url="Pages" Path="">

     <File Name="MyDefault.aspx" Url="DefaultOrgFuncHomePage\default.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">

     <Property Name="Title" Val

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