.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Style Sheet for Child Page in C#.net

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :ASP.Net

Dear All

I am using Master Page for my applications and i am using external Style Sheet (ie style.css).

Child pages not inherit the master page style sheet.

Please let me know how can i call the style sheet for my child pages.

Thanks and Regards


View Complete Post

More Related Resource Links

Wiki page style sheet in SP 2007


Is there any way I can add CSS information with the HTML behind a Wiki page?

I wan't to make one pagethat serves as a templatesfor future posts, and I like to control the layout of this post and subsequent posts through a stylesheet.


update parentpage gridview with the values from child page?


hi   i am having a gridview on each row i am having a update and add button.

on click of either of the button i am opening a popup where the end user will enter data and on clck of ok button in the child page

based on the click ie

if i clicked update i need to update that particular row with the values from child page.

if i clicked on add i need to add a row below the row where i clicked add button .

can anyone help me with this?

external content not load in page like style and js in asp.net mvc when i use area


i am working on a asp.net mvc 2 website who have a area and i have a problem with them.

i use different different url routing for application settings. i have two folder called style

first folder location in main directory  /Style/style.css

second folder location in Area area/style/style.css

everything is work fine in application but when i used style.css from main directory in my area's views then style not worked. when i track them from firebug then i got error "The resource could not be found" but path is correct.

sombody tell me to use absolute path to solve this issue. how i can use absolute path to declare resource url in views.

any suggestion , sollution on this issue who can help me to solve this issue.

Drop down boxes in Build Style (Style sheet editor) have no values.

In visual studio 2008, in a Web Application (ASP.net) I open a style sheet, right click and then Select "Build Style"I get the modify Style screen.The font-family drop down box has all of the fonts.The Font-size, font-weight, font-style, font-variant, Drop down boxes are all empty.They are even empty when I select a font.I tried devenv /resetsettingsthat didn't helpI have uninstalled Visual studio 2008 completely, reinstalled,Applied SP1, and did not change any settings.That didn't helpI have googled, nothing.Other people here, at work,Have items in these drop down boxes.Is there something special I need to do to getThose drop down boxes populated?I posted this message in the ASP forum,but they didn't seem to understand.I am having the problem in the Visual Studio 2008 IDE,not on a web page.  Thanks in Advance,  

Accessing controls / events on a master page from child page

I have a problem i am trying to work out the best method with my limited skills. Im using vb.net ( VS 2010  ) I am using a dll for an IFrame , which is call from code behind.  On my site I havea masterpage which has two gridviews. ( GrdViewWebBureau is the one i am using for this  query)  GrdViewWebBureau is contained within an update panel and updated on a timer control trigger. GrdViewWebBureau updates the page with file counts and status from our clients. I can click on any one of the cells and the code behind is fired. What I am trying to do is put an IFrame on the master page and every time a user clicks on the grid, the Iframe is fired up.  I have tested the iframe and vb code behind from a dummy page and it works, however when the Iframe is on the master page it doeant work.  What I am tryingh to achieve is that no matter what page a user is on the site, they will be able to click on the GrdViewWebBureau and the iframe will fire with the correct childpage. Each webPage may also have an Iframe as well, so i dont know if it is possible to make the IFrame global and just call that control ??  I have no idea if 1 this is possible with the code i have and 2, if i have the brains to understand the who what why and when. Please can you look at my code and pass anyt suggestions / help /  solutions. Master Pa

How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx)

I have a parent .aspx page that has a asp:panel control in it, and this parent .aspx is also referencing a user control that I registered in that .aspx. Lets just call it usercontrolA.ascx for this post.The user control has a radiobuttonlist itself.Based on a selection from the radiotbuttonlist in the user control, I want to be able to hide the asp:panel in my .aspx (parent) but unfortunately I cant' get it to work:parentPanel.visible = true;  <<< I trried this in usercontrolA.ascx.csBut the user control doesn't know about the panel in the parent .aspxSo do I need to expose that somehow from the parent so that I can access it from the code behind of the child .ascx?  How?

Adding Control To The Child ASPX Page

While i add a asp.net label control to the existing child page to modify it. It gives an error  "SharePoint Designer cannot render the XSLT in this Data View. Try to undo your changes or re-insert the Data View.Failed setting processor stylesheet : 0x80004005 : Keyword xsl:when may not be used here."  Pl z suggest the solution

Page level variables and style

Making my first ASP.NET/C# program which utilizes three ASP.NET Calendar controls and allows the user to choose the year/month from dropdown lists and then adjusts the three calendars accordingly.  i.e. if the user chooses August, Calendar1 will be June, Calendar2 will be July, and Calendar3 will  be August, and then pulling dates of events from an SQL database and changing the colors of days on the calendars of the days.I got it working like I want it --- the program fulfills its function.  However, the code is absolutely horrible and hard to follow.  I want to learn some good style and clean it up, but I'm not even sure where to begin.  For starters, I had to pretty much declare every variable throughout the program at page level and static, otherwise the values were getting reset to 0 and blank upon postback.  So the top of my code looks like: public partial class _Default : System.Web.UI.Page { public static String selectedclient; public static int selectedyear; public static int selectedmonthminus2; public static int selectedmonthminus1; public static int selectedmonth; public static String selectedyearstring; public static String selectedmonthminus2string; public static String selectedmonthminus1string; public static String selectedm

New Page dialog takes master page style

I am designing a master page for my companies intranet. I started out with the simple master page that is included. I built my html and created a custom style sheet. Everything appears to work just fine. Except when I click Site Actions > New Page and I get the New Page dialog box, the box takes the style of my master page. It includes the banner and the navigation bar and squishes everything together. The textboxes are still there and they work just fine, but how do I get that box to not take the master page layout?

I want to open a web page (.aspx page,child window from parent window) without titlebar how can we d


Hi All,

i have some special requirement like , i want to open a web page (child page) without a title bar for this i am following the below approach but it is not working, to open child window from parent window i am calling this javascript function to the of href of anchor tag...

function OpenChildWindow()

but the child window is opened with titlebar, but i don`t want any titlebar.

the titlebar property i was used in the above method is not working why?

how can we do this, can anybody help me...


Burepalli V S Rao.

master pages - objection - child page



If I have have a master page with an object defined in the page load

am I able to access that object from within the page load of a child page?

Thanks in advance

Check for session in master page before child page


I have a site which has restricted access.  Access is controlled via session variables.
There are a lot of pages to the site so I was going to check for the session variable via the page load event in my mater page.  However, on certain pages I use the session variable in that pages page load event.  This throws an error when the session doesn't exist, but what I want is the master page's page load to fire first.

Does anyone know how I could achieve this?

How to change CSS style for unordered list item in master page using VB


When a user logs in to the site, I'm trying to change the color (to "white" -- but only when there is a logged in user) of a list item that is contained on my master page. It is not working. Below is the markup and error message. What am I doing wrong? Thank you.

<script runat="server" language="vbscript">
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim currentUser As MembershipUser = Membership.GetUser()

        If currentUser IsNot Nothing Then
            acme.Style("color") = "white"

        End If

    End Sub
    Protected advertise As System.Web.UI.HtmlControls.HtmlGenericControl


On same master page:

<div id="menu">

<ul> <li id="acme"><a href=".

Page level global variables --- *always* bad style?


Creating an interface that we'll use internally to view and modify contents of a database.  The page uses the Wizard Control and a dropdown list to determine which clients information to display in the Wizard.

Current, I have a page level variable like this:

public static String selectedclient;

In this way, I can easily preserve which client is selected from the dropdown list between postbacks.  As it is, the program works fine.  The functionality is fulfilled.  I just keep reading that such public static page level variables are a bad idea, and that it has something to do with multithreading.  However, I've yet to see a problem or have any issues.

I really want to do this program "right" (good style), as this finished product will be used for years.  Is it going to come back to haunt me in the future if I leave it like it is?  If I need to change it, what would be a good way to preserve the same functionality?

One thing I'm thinking is that, any place where I need the selectedclient information, I could just use ClientDDList.SelectedValue.ToString().  But before I go and replace every selectedclient with ClientDDL.SelectedValue.ToString(), I'd like some advice on this issue.


WPF Passing a value from parent to a child 'page' hosted in a frame.



I have - what might look like an obvious question - for me it is a headache.

Some background info:

In a WPF Window, I have placed a frame. A Ribbon button in the WPF window executes NavigationServices as you can see below. Mind there is no navigation History (back/Forward).

    Private Sub rTabToolsRgpSystemAdministrationRbtnPolicyEditor_Click(ByVal sender As ObjectByVal e As System.Windows.RoutedEventArgsHandles rTabToolsRgpSystemAdministrationRbtnPolicyEditor.Click
        InsertNavigationAction("Policy Editor")
        piFrame.NavigationService.Navigate(New System.Uri("piPolicyEditor.xaml"UriKind.Relative))

I am trying to pass a string variable (s

Making MDI Child on top of page.

Hi All:

I have a Tablelayoutpanel inside MDI Form which has some links. When I click on any link, a new MDI child opens but it is hidden behind tableLayoutPanel. I have written following code to hide the TableLayout so that MDI child form is on top.

frmSubject newMDIChild = new frmSubject();
            // Set the Parent Form of the Child window.
            newMDIChild.MdiParent = this;

            foreach (Control obj in this.Controls)
                if (obj.GetType().FullName != "System.Windows.Forms.MdiClient")
                    obj.Visible = false;                
            // Display the new form.
This works fine. But Now on close of MDI child form, I want to make TableLayoutPanel Visible. But it is not working. How

Find Control of parent webpage from child page under iframe



I  Have a webpage suppose ParentPage.aspx which contains a iframe. Under iframe i am calling another webpage Childpage.aspx . Now i want to access ParentPage controls from ChildPage and change the property of that control.

Can any one suggest me how it is possible ?

Below i am writing a code which i am trying. In this code Page.PreviousPage is always null .

if (Page.PreviousPage != null)
                    AjaxControlToolkit.TabPanel objTab = (AjaxControlToolkit.TabPanel)Page.PreviousPage.FindControl("pnlDataElement");
                    if (objTab != null)
                       objTab.Enabled = true;

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