#1
  1. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Dec 2005
    Posts
    261
    Rep Power
    13

    How to replicate this on another aspx page?


    Hello

    I am attaching a screenshot of a Web form page (Register.aspx) and I was hoping to replicate that purple bar along the top of
    another page, but I can't determine what its properties are because if I hover the mouse over it in the 'Design View' of Register.aspx it changes into a small red 'no entry' sign; nor does the bar seem to appear in the Properties window. That is, I am not sure how to identify it.



    In 'Source View' of Register.aspx, all I can see at the top of the page is this:

    Code:
    <%@ Page Title="Register" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Register.aspx.vb" Inherits="Account_Register" %>
    
    <asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    In my 'site.master' page, I have the following which could refer to the purple bar:

    Code:
    <div class="navbar navbar-inverse navbar-fixed-top">
                <div class="container">
                    <div class="navbar-header">
    
    etc etc
    I would be grateful for any advice.

    Thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Jul 2010
    Posts
    138
    Rep Power
    12
    If the reference in your master page to the navigation bar is indeed that purple bar, then when you create a new web page, just check the box on the bottom that says Select master page, and the purple bar will automatically appear in your new page. If it isn't, then you need to copy/paste code from the page that you want, and then place it in the new page. You would find the code in visual studio, in the solution explorer. Right click register.aspx, and select view markup, then review the code for any navigation bar references, or something similar.

    I would start by creating a new page and adding the site.master, and viewing the blank page in debug mode (F5).

    If that doesn't work, then view the register.aspx page in markup view, then copy and paste the code you need from the register.aspx page.
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Dec 2005
    Posts
    261
    Rep Power
    13
    Hello

    Thanks for your reply.

    That select option is not available.

    So, you do mean I should copy the script from Register aspx and paste it into my new page? They are different types of pages. Register.aspx has form fields; my new page simply says 'thanks for registering'.

    It seem this problem is common: Add Web Form - no option to select existing Master Page

    Thanks!
  6. #4
  7. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Jul 2010
    Posts
    138
    Rep Power
    12
    What program are you using to make these pages?

    I would recommend upgrading visual studio express to the latest version, link here.
    Last edited by Superdawg; October 6th, 2014 at 02:00 PM.
  8. #5
  9. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Dec 2005
    Posts
    261
    Rep Power
    13
    I have that already, Superdawg.

    Do you think it's worthwhile me trying out the idea of the link posted above: 'I can right-click the Master Page and select Add Content Page and that works'.

    Or, deleting my new page that says 'thanks for registering' but keeping the code. Adding a 'New Item' and calling it by the same name. Then copying and pasting the code from Register.aspx into that new file. Keeping all the headers, etc but deleting the form fields, and then pasting the script into it from my 'thanks for registering'. It seems a bit messy, but I'm not sure of how else to do it.
  10. #6
  11. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Aug 2008
    Location
    USA
    Posts
    1,606
    Rep Power
    347
    I have never seen this issue before, to workaround with your solution , i would suggest create two panel and base on your registration hide/show them , no need to create multiple pages to say thanks for register.

    Could you please more elaborate your problem & what all option did you try for this.

    Comments on this post

    • SteveHigh agrees
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

    Jquery Shake Effect ,
    Andriod KitKat


    Thank You,
    KiranK
  12. #7
  13. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Dec 2005
    Posts
    261
    Rep Power
    13
    OK, I will try to explain.

    I have one ASP.NET (VB) project in VS 2013 that consists of two VS default forms taken from Solution Explorer. One form is Register.aspx (with Register.aspx.vb) and the other is Login.aspx (with Login.aspx.vb). I wanted to inform the user - before he logged in - that his registration had, in fact, been successful, so in Solution Explorer, I added a New Item and called it success.aspx. Register.aspx and Login.aspx are almost identical in terms of layout because they are default files, whereas success.aspx is my own added item. What I would like to do, in order to maintain a design consistency, was to copy into success.aspx those features of Register.aspx and Login.aspx. For example, all three files share the same background image. However, the purple bar along the top of Register.aspx and Login.aspx does not appear in success.aspx and I wouldn't expect it to because when I added that file as a New Item there was no option to have Site.master 'govern' that page. That's fine, but I am having difficulty incorporating that purple bar into success.aspx.

    I have tried to import, into success.aspx, the top two lines of Register.aspx, which are:

    Code:
    <%@ Page Title="Register" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Register.aspx.vb" Inherits="Account_Register" %>
    
    <asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    because I suspect they display the purple bar, but I ran into various problems related to 'runat'. Runat occurs in the second line above, and also in the <head> tag of my success.aspx page:

    Code:
    <head runat="server">
    So that's where I am stuck at the moment. What I could do, is delete success.aspx and add a New Item (an HTML page) and customise the CSS to ensure a consistent design. I would use the same code in that HTML file as I have in success.aspx - it personalises the 'thank you. Do you think that would work?

    Many thanks.

    Steve

Similar Threads

  1. Replies: 14
    Last Post: May 23rd, 2006, 08:26 AM
  2. passing session from .aspx page to .asp page
    By s_sameer in forum ASP Development
    Replies: 0
    Last Post: June 6th, 2005, 01:56 AM
  3. aspx page takes over the main page on form submit
    By NuclearNation in forum .NET Development
    Replies: 1
    Last Post: August 10th, 2004, 02:35 AM
  4. Can include file in .NET aspx page overlay aspx controls?
    By K2.Netter in forum .NET Development
    Replies: 1
    Last Post: July 6th, 2004, 02:51 AM
  5. Replicate a DB in MSSQL from an ASP Page
    By DesignerDesign in forum ASP Development
    Replies: 0
    Last Post: January 29th, 2004, 11:47 PM

IMN logo majestic logo threadwatch logo seochat tools logo