masterpage

master page has runat=server on the head tag element, it is injecting a stylesheet using themes?

master page has runat=server on the head tag element, it is injecting a stylesheet on the page for some reason and I am not doing it explicitly. Is it a themes setting that is adding the stylesheet? How can I disable it for this master page? ...

ASP.Net - How to access masterpage Object from regular page?

In a project I'm working on, the master page codebehind does a load of complex checks and confirmations that decide the navigation list displayed on the TreeView of the page. Now, I need a way to access this list from another front-end page, such as "frontpage.aspx". This serves two purposes. One, the masterpage will hide pages on the n...

Need help setting text prop of label (in a content page) in jQuery

I have searched already but unable to find an answer that works. I simply want to set the text of a label that is in a content page. Obviously because the control is in a content page it has the modified client id. So I know simply ".labelName" will not work alone because the client id is for example "ctl00_ContentPlaceHolder1_labelName"...

defaultbutton in ASPX content page gives The DefaultButton of 'pnlHolder' must be the ID of a control of type IButtonControl

I am trying to set a default button in my ASPX page. I have a master page so the form is there. I have a panel in the content page that holds a table that organizes a number of textboxes, dropdowns and other inputs. The last row of the table holds some buttons, one of which I want to be the default button. After doing some research, ...

How to determine current Page.Title value from UserControl

I have a MasterPage, several content pages - each of the content pages have a UserControl. In the MasterPage, I'm setting the Page.Title programmatically based on Page_Init "Request.UserAgent.Contains....", so that the content pages end up with different page titles based on this. Each content page has its Title set to blank (Title=" "...

Change the master page from code behind

I have a web page named MyPage.aspx and two master page named Home.master and BlanK.master. By default MyPage.aspx uses Home.master.But based on some condition I need to change the master page from Home.aspx to Blank.master.So, how to do this from code behind in c#?I mean how change the master page from code behind? ...

dropdown lists on master page, dropdown lilsts manipulation(logic, events) on content page

I have a Content Page with drop down lists within an update panel: <asp:UpdatePanel ID="upVehicleFilter" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional"> <ContentTemplate> <asp:DropDownList id="ddlYear" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlYea...

remove or change metatags in masterpage

Hello. I have a masterpage and I wrote metatags in masterpage.master.cs. In the category page which is generated from the masterpage every category has their own metatags. When the user visits category.aspx I want to change the metatags. All metatags are dynamically created and they don't have an id or runat because I create them dynamic...

Dynamic Master page

Hi, I am Srinivas, I m new to working on Dynamic master page. I'm presently working on Loading on Dynamic Master Page. When I'm loading the master page dynamically, I am getting this error. "Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate du...

Enabling anonymous access in SharePoint 2010 not working

CENTRAL ADMIN I have created a web application using claims based authentication. I have allowed anonymous access on the default zone. Anonymous policy is set to none in central admin for the default zone. I have added no additional users in 'User Policy'. SITE COLLECTION LEVEL Site settings -> Site Permissions -> Anonymous Access ->...

Timer in UpdatePanel...

Hello all, I have an asp:UpdatePanel with an asp:Timer. These are in a Master/Content Page. The code is below: <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"></asp:Timer> </ContentTemplate> </asp:U...

Is it possible to handle a MasterPage event in a UserControl (C#)

Hi, I've seen code to handle MasterPage events in the content Page, but if I'm loading a UserControl dynamically into the Page, can I handle the event in the UserControl instead? Basically I have a button on the MasterPage, when it's clicked I need to make the UserControl do something, such as display text or change a value in a form. ...

Can I know what page is in my master page's ContentPlaceHolder?

All the Google finds I ran into tell me how to use FindControl to access a control on the master from the content page itself. However, what I'm trying to do is the opposite. From the master page, I want to reference whichever child page is in the ContentPlaceHolder. Why you ask. I want the master page to know which tab should be activ...

Help to FindControl with dynamically created gridview using ITemplate

Good day all, I am having problems trying to use FindControl with my gridview. I am generating the gridview columns using the ITemplate function. This generates a bunch of textbox fields for me that the user has to input some data. The number of columns vary depending on user requirements, so I have to generate the grid dynamically. I...

Registering jQuery-script on master page code-behind doesn´t affect scripts on MasterPage

Hello, in my .net-Project, I use a master page on which I dynamically register the jQuery-library. public partial class Application : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { ScriptManager.RegisterClientScriptInclude(this, this.GetType(), "jquery", VirtualPathUtility.ToAbsolute(...

Need the clientId of a textbox inside a content control using javascript

I have a masterpage that contains all the javascript and inside the content control, there is a link that calls a javascript function and I want to pass the id once it's rendered differently by the server. <asp:TextBox ID="txtstart" runat="server" Width="20%"></asp:TextBox> <a title="Pick Date from Calendar" onclick="calendarPicker('<% ...

Popup needs to refer back to textbox within a content control

I have a link that is located inside a content control. This link calls a javascript function that opens a popup window containing a calendar and passes it the transformed id from the server of a textbox control using clientid. I need to be able to click on a date and have the popup close and insert the date into the textbox of the id I ...

Masterpage to detect response redirect

I want to clear a placeholder control on my masterpage every time a Redirect is being made. How can I achieve that in codebehind? I could check whether the last saved url and the current url match, but that is a really a makeshift solution I don't wanna' go for. Something like [if(//Page Redirect detected){//do something} ...

Master Page Help

Hello, I am sort of new to the whole html and css scene! All I really want to do is have a background, the content placer in the middle, and a header. An example would be this: http://img46.imageshack.us/img46/3751/38244782.png Would someone please help me do something really simple like this? Thanks ...

How to run jquery script if html page is the home page... ?

Hello All, I'm working with an external team with our website and they recently added one of my scripts to the .NET MasterPage of the site... well it did finally get my script running but now... it loads Banners on 'every' page on the site. How can I write an 'if' statement that basically says... if this is the home page... run this sc...