Hi All,
I'm currently attempting a project in web development using c#. My experience in either is admittedly limited but I just wanted to try and clear up some things that I'm not sure I've either understood correctly or am implementing correctly.
I've created a home page and can navigate between pages, however, how do I ensure that all buttons are positioned uniformly on each page? I've tried implementing CSS for fonts but this doesn't seem to work for backgrounds. Also, to try and get uniformity (and in honesty save time) I wanted to copy this to use for future pages but then I get parameter errors as the button names are already defined on the home page? Is there an easy way of getting around this?
As I say, I'm looking for the same format across all pages? Apologies if this is a silly/basic question, I'm just trying to understand how it all works!
Any help/advice is appreciated.
Thanks,
Kate
Katie BPosted Mar 27, 2015, 7:07 AM
Hi Khargesh,
Sorry, just trying to understand for future reference….I still feel all too new to this!
So if I add those tags behind the master and child page respectively it should then allow editing and I can (as I understand from that link) add a content placeholder within the master page that will then knock onto the child page and allow editing?
Or have I misunderstood?
Thank you for your time and patience on this one!
Many Thanks,
Kate
Khargesh RajputPosted Mar 27, 2015, 6:40 AM
you have to add textbox or your content you want to use in child page add in child page
masterpage content like this
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
and child page
like
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>
visit
http://www.codeproject.com/Articles/325865/Creating-Master-Page-In-ASP-NET
Katie BPosted Mar 27, 2015, 6:31 AM
Hi Khargesh,
I did think that I should be able to edit the child page from the child page but im only getting that void symbol.
I hope you can see the screen shot above.
Many Thanks for your help!
Kate
Khargesh RajputPosted Mar 26, 2015, 11:40 PM
may be your textbox on masterpage, then you can change it on masterpage designview or sourceview.
I you are adding new childpage then controls of childpage can be edited in child page
Katie BPosted Mar 26, 2015, 4:50 PM
Pankaj Kumar ChoudharyPosted Mar 26, 2015, 12:28 AM
for this you can refer...
http://www.codeproject.com/Articles/333650/Beginner-s-Tutorial-on-Master-Pages-in-ASP-NET
http://www.asp.net/web-forms/overview/older-versions-getting-started/master-pages/multiple-contentplaceholders-and-default-content-cs
Khargesh RajputPosted Mar 25, 2015, 9:11 PM
And then add all childpages in masterpage
Read about masterpage from google
http://www.codeproject.com/Articles/333650/Beginner-s-Tutorial-on-Master-Pages-in-ASP-NET
http://www.asp.net/web-forms/overview/older-versions-getting-started/master-pages/creating-a-site-wide-layout-using-master-pages-cs