CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2014
    Posts
    48

    About Content code at top of the aspx page

    Hello

    At the top of my aspx page, I have

    Code:
    <%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="success_test1.aspx.vb" Inherits="Success_test1" %>
    followed by:

    Code:
    <asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    Is that correct, please, or is it this:

    Code:
    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    Would that be the same for my other aspx files in the same Solution Explorer project?
    Thanks!

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: About Content code at top of the aspx page

    I know this isn't an answer to your question but why are you coding in old asp? What version of Visual Studio are you using?

    I ask because if you are starting a new web project, there are many newer ways to go such as .Net Core, MVC, Angular, React and so on.

    On the other hand, if you have an existing asp application with other pages, you should be able to answer your own question by looking at how the other pages are coded.

    If at all possible, there are many benefits to moving away from the 15 year old asp.net technology.

  3. #3
    Join Date
    Sep 2014
    Posts
    48

    Re: About Content code at top of the aspx page

    Thanks Arjay for your reply.

    I am using ASP.NET in Visual Studio 2017 (latest version). It's a Web Forms project.

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured