在C#visual studio中更正母版页问题 [英] Correct a master page issue in C# visual studio
本文介绍了在C#visual studio中更正母版页问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的主页。它给了我一个错误这个页面包含附加到母版页时无效的代码我不知道为什么?
This is my home page. It is giving me an error "This page contains code that is not valid when attached to the Master page" I don't know why?
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Poonam1._Default" %>
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
<div class="jumbotron">
<h1>POONAM1</h1>
<p class="MsoNormal">
<span>A paradigm & revolution in ecommerce </span></p>
<p class="MsoNormal">
</p>
<p class="MsoNormal">
<span><span style="font-size: medium">This page will redirect you to</span> <span style="font-size: medium">the demo portal of Jileva (hypothetical name) where you, the user can in a simulated manner, feel and experience the process and workflow of the Poonam Application. This will be a hands on experience, but remember this is only a simulation, and the actual experience will be much more interesting, but, at the same time much more intense. Once you read through this page, there is a link to the demo page, at the bottom of this page.</span></span></p>
<p class="MsoNormal">
</p>
<p class="MsoNormal">
</p>
<p class="lead"> </p>
</div>
<div class="row">
<div class="col-md-4">
<h2>Getting started</h2>
<p> </p>
<p class="MsoNormal">
<span>Before you visit the demo, there are certain concepts that you must be aware of. And they are:
</span>
</p>
<ul>
<li>
<p class="MsoNormal">
<![if !supportLists]><span>Familiarity with the new concept of parallel shopping as explained on this website.</span></p>
</li>
<li>
<p class="MsoNormal">
<span>Knowledge of ecommerce basics and online shopping portals.</span></p>
</li>
<li>
<p class="MsoNormal">
<![if !supportLists]><span>Understanding the terms JCOP and JCPP and how they uniquely benefit the user.<o:p></o:p></span></p>
</li>
<li>
<p class="MsoNormal">
<![if !supportLists]><![endif]><span>Understand during the demo the difference between other price aggregator sites and us.<o:p></o:p></span></p>
</li>
<li>
<p class="MsoNormal">
<o:p>
There is no user name/password feature</p>
</li>
</ul>
<p>
</p>
<p>
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkId=301949">See Home Page »</a></p>
<p>
</p>
</div>
<div class="col-md-4">
<h2>Know More</h2>
<p>
</p>
<ul>
<li>
<p class="MsoNormal">
<span>This is a Proof of Concept (POC) and not an actual live transaction.</span></p>
</li>
<li>
<p class="MsoNormal">
<span>The vendors and their products displayed here are based on the vendors' participation.</span></p>
</li>
<li>
<p class="MsoNormal">
<span>There will be only one order and not separate orders of each vendors. That is the core.</span></p>
</li>
<li>
<p class="MsoNormal">
<span>There will be only only combined shipment for every individual order.</span></p>
</li>
<li>
<p class="MsoNormal">
<span>It is not mandatory to select a second product from a separate vendor if you want just one product.</span></p>
</li>
<li>
<p class="MsoNormal">
<span>No actual payment is to be done in this POC, it is just a simulation</span></p>
</li>
<li><span>It is appreciated if you can give us your feedback, comments and suggestions in our Contact Us page. </span></li>
</ul>
<p>
</p>
<p>
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkId=301949">See Use Cases »</a>
</p>
<p>
</p>
<p>
</p>
<p>
</p>
<p>
<a href="~/demoa1.aspx" class="btn btn-primary btn-lg">Visit Demo Page »</a></p>
</div>
<div class="col-md-4">
<h2>The Jileva Process </h2>
<p>
You can easily find your way around this demo with the right mix of features and price.
</p>
<p class="MsoNormal">
<span>Be familiar with the entire lifecycle of the Jileva platform before you enter the demo/ POC. Here are some things to remember:</span></p>
<p class="MsoNormal">
<![if !supportLists]><span>You can select multiple products from more than one vendor. </span>
</p>
<p class="MsoNormal">
<![if !supportLists]><![endif]><span>No matter how many vendors you engage, there will be only one order. That is our USP.</span></p>
<p class="MsoNormal">
<![if !supportLists]><![endif]><span>Also there will be one combined, synchronous shipment for your products. That is JCPP.</span></p>
<p>
</p>
<p>
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkId=301950">Process Page »</a>
</p>
</div>
</div>
</asp:Content>
What I have tried:
It does not open the designer view for me, but it does not give me build errors as well
What I have tried:
It does not open the designer view for me, but it does not give me build errors as well
推荐答案
try this
right click the project ->add new item
-> select \"web form with master page
\" ->add
- > selec themater page
from the list view -> ok
now try to replicate the same in your page, check the difference on two files and do the correction.
refer
Getting a masterpage error in asp.net - Stack Overflow[^]
master pages - ASP.NET MasterPageFile causing error - Stack Overflow[^]
try this
right click the project ->add new item
-> select "web form with master page
" ->add
- > selec themater page
from the list view -> ok
now try to replicate the same in your page, check the difference on two files and do the correction.
refer
Getting a masterpage error in asp.net - Stack Overflow[^]
master pages - ASP.NET MasterPageFile causing error - Stack Overflow[^]
这篇关于在C#visual studio中更正母版页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文