母版页 [英] Master Pages

查看:86
本文介绍了母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经为我们的网站使用了母版页,一切正常,直到我们需要更新其中一个dll文件。当一个新的dll被添加或旧的dll更新时,网站会给出一条错误消息,可以通过对主页文件进行一次小的更改来纠正(例如添加空格并保存)。


编译器错误消息:BC30260:''__ control2''已经声明为

''Private Dim __control2 As System .Web.UI.HtmlControls.HtmlLink''在这个类中。


源错误:

第2行:<%@ Register TagPrefix =" Sagara" ; Namespace =" Sagara.BreadCrumbs"

Assembly =" BreadCrumbs" %>

第3行:< html>

第4行:< head runat = server>

第5行:< meta http-equiv =" content-type"

content =" text / html; charset = ISO-8859-1">

第6行:< link的rel ="样式表"类型= QUOT;文本/ CSS" href =" /iris.css">

源文件:E:\ TestSite \includes \ NoRight.Master


会导致什么这个错误以及如何防止这种错误?

We have used master pages for our website and everything works fine until we
need to update one of the dll files. When a new dll is added or an old one is
updated the website gives an error message that can be corrected by making a
small change to the master page file(such as adding a space and saving).

Compiler Error Message: BC30260: ''__control2'' is already declared as
''Private Dim __control2 As System.Web.UI.HtmlControls.HtmlLink'' in this class.

Source Error:
Line 2: <%@ Register TagPrefix="Sagara" Namespace="Sagara.BreadCrumbs"
Assembly="BreadCrumbs" %>
Line 3: <html>
Line 4: <head runat=server>
Line 5: <meta http-equiv="content-type"
content="text/html;charset=ISO-8859-1">
Line 6: <link rel="stylesheet" type="text/css" href="/iris.css">
Source File: E:\TestSite\includes\NoRight.Master

What would cause this error and how can this be prevented?

推荐答案

您应该可以通过指定Web应用程序来控制它

自动使用新版本的DLL。如果你打算使用1.x

方法(编译程序集)和2.0(假设是这样,因为你是b
),你应​​该将网站编译成无论何时进行更改,都要部署和部署

代码。您可以获得以下几个好处:


1.实际页面未部署,因此您不太可能有人偷窃任何来源。


2.预编译的网站将运行得更快,至少在理论上如此。


另一种选择是使用新的.axd文件(预编译) .axd或compile.axd)

将重新运行网站并确保所有人都使用新的DLL。这可能仍然需要告诉应用程序它需要使用新版本的DLL(在

配置中),但我不这么认为。


如果这是1.x,上面的大部分建议仍然有效,虽然你没有预编译等,但是必须使用config来指示新的版本

将由您的应用程序使用。

---


Gregory A. Beamer

MVP; MCP:+ I,SE,SD,DBA


***************************

在盒子外面思考!

*************************** >
TBocchino写道:
You should be able to control this by specifying that the web application
automatically uses a new version of the DLL. If you are going to use 1.x
methodologies (compiling assemblies) with 2.0 (assuming so, since you are
talking master pages), you should compile the site to deploy and deploy that
code whenever changes are made. You get a couple of benefits:

1. The actual pages are not deployed, so you have less likelihood of someone
stealing any source.

2. The site, precompiled, will run quicker, at least in theory.

One other option is to use the new .axd file (precompile.axd or compile.axd)
which will rewalk the site and ensure all use the new DLL. This may still
require telling the app it needs to use a new version of the DLL (in the
config), but I do not think so.

If this is 1.x, the majority of the advice above still works, although you
do not have precompile, etc., but have to use config to indicate new versions
are to be used by your app.
---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"TBocchino" wrote:
我们已经为我们的网站使用了母版页,一切正常,直到我们需要更新其中一个dll文件。当添加新的dll或更新旧的dll时,网站会给出一条错误消息,可以通过对主页文件进行小的更改(例如添加空格和保存)来纠正。

编译错误消息:BC30260:''__ control2''已在本课程中声明为''Private Dim __control2 As System.Web.UI.HtmlControls.HtmlLink''。 />
源错误:
第2行:<%@ Register TagPrefix =" Sagara" Namespace =" Sagara.BreadCrumbs"
Assembly =" BreadCrumbs" %>
第3行:< html>
第4行:< head runat = server>
第5行:< meta http-equiv =" content-type"
content =" text / html; charset = ISO-8859-1">
第6行:< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" /iris.css">
源文件:E:\ TestSite \includes \ NoRight.Master

什么会导致此错误以及如何防止此错误?
We have used master pages for our website and everything works fine until we
need to update one of the dll files. When a new dll is added or an old one is
updated the website gives an error message that can be corrected by making a
small change to the master page file(such as adding a space and saving).

Compiler Error Message: BC30260: ''__control2'' is already declared as
''Private Dim __control2 As System.Web.UI.HtmlControls.HtmlLink'' in this class.

Source Error:
Line 2: <%@ Register TagPrefix="Sagara" Namespace="Sagara.BreadCrumbs"
Assembly="BreadCrumbs" %>
Line 3: <html>
Line 4: <head runat=server>
Line 5: <meta http-equiv="content-type"
content="text/html;charset=ISO-8859-1">
Line 6: <link rel="stylesheet" type="text/css" href="/iris.css">
Source File: E:\TestSite\includes\NoRight.Master

What would cause this error and how can this be prevented?



需要注意的事项,如果您使用的是ASP.Net 2.0的主页和

制作您的网站公开你违反了许可证。目前你不能公开部署ASP.Net解决方案。将在年初的某个时间有一个上线许可证

,这将让你这样做。


希望这会有所帮助,

Mark Fitzpatrick

Microsoft MVP - FrontPage


" TBocchino" < TB ******* @ discussions.microsoft.com>在消息中写道

新闻:0A ********************************** @ microsof t.com ...
Something to keep in mind, if you are using Master Pages for ASP.Net 2.0 and
making your web site public you are violating the license. Currently you
can''t deploy ASP.Net solutions publically. There will be a go-live license
sometime at the beginning of the year that will let you do that.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"TBocchino" <TB*******@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
我们已经为我们的网站使用了母版页,一切正常,直到
我们需要更新其中一个dll文件。当添加新的dll或更新旧的
时,网站会给出一条错误消息,可以通过对主页文件进行小的更改来纠正(例如添加空格并保存)。编译器错误消息:BC30260:''__ control2''已经声明为''私有Dim __control2 As System.Web.UI.HtmlControls.HtmlLink ''在这个
课程中。

来源错误:
第2行:<%@ Register TagPrefix =" Sagara" Namespace =" Sagara.BreadCrumbs"
Assembly =" BreadCrumbs" %>
第3行:< html>
第4行:< head runat = server>
第5行:< meta http-equiv =" content-type"
content =" text / html; charset = ISO-8859-1">
第6行:< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" /iris.css">
源文件:E:\ TestSite \includes \ NoRight.Master

什么会导致此错误以及如何防止此错误?
We have used master pages for our website and everything works fine until
we
need to update one of the dll files. When a new dll is added or an old one
is
updated the website gives an error message that can be corrected by making
a
small change to the master page file(such as adding a space and saving).

Compiler Error Message: BC30260: ''__control2'' is already declared as
''Private Dim __control2 As System.Web.UI.HtmlControls.HtmlLink'' in this
class.

Source Error:
Line 2: <%@ Register TagPrefix="Sagara" Namespace="Sagara.BreadCrumbs"
Assembly="BreadCrumbs" %>
Line 3: <html>
Line 4: <head runat=server>
Line 5: <meta http-equiv="content-type"
content="text/html;charset=ISO-8859-1">
Line 6: <link rel="stylesheet" type="text/css" href="/iris.css">
Source File: E:\TestSite\includes\NoRight.Master

What would cause this error and how can this be prevented?



目前我们在测试网站上使用Master Pages for ASP.NET 2.0进行
开发,这导致了当网站上的dll更新时,测试网站会关闭。


Mark Fitzpatrick写道:
Currently we are using Master Pages for ASP.NET 2.0 on our test site for
development and it is causing the test site to go down when the dlls are
updated on that site.

"Mark Fitzpatrick" wrote:
需要注意的是,如果您使用ASP.Net 2.0的母版页和
使您的网站公开,则您违反了许可。目前,您无法公开部署ASP.Net解决方案。将在年初的某个时候有一个上线许可证,可以让你这样做。

希望这会有所帮助,
Mark Fitzpatrick
微软MVP - FrontPage

TBocchino < TB ******* @ discussions.microsoft.com>在消息中写道
新闻:0A ********************************** @ microsof t.com。 ..
Something to keep in mind, if you are using Master Pages for ASP.Net 2.0 and
making your web site public you are violating the license. Currently you
can''t deploy ASP.Net solutions publically. There will be a go-live license
sometime at the beginning of the year that will let you do that.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"TBocchino" <TB*******@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
我们已经为我们的网站使用了母版页,一切正常,直到
我们需要更新其中一个dll文件。当添加新的dll或更新旧的
时,网站会给出一条错误消息,可以通过对主页文件进行小的更改来纠正(例如添加空格并保存)。编译器错误消息:BC30260:''__ control2''已经声明为''私有Dim __control2 As System.Web.UI.HtmlControls.HtmlLink ''在这个
课程中。

来源错误:
第2行:<%@ Register TagPrefix =" Sagara" Namespace =" Sagara.BreadCrumbs"
Assembly =" BreadCrumbs" %>
第3行:< html>
第4行:< head runat = server>
第5行:< meta http-equiv =" content-type"
content =" text / html; charset = ISO-8859-1">
第6行:< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" /iris.css">
源文件:E:\ TestSite \includes \ NoRight.Master

什么会导致此错误以及如何防止此错误?
We have used master pages for our website and everything works fine until
we
need to update one of the dll files. When a new dll is added or an old one
is
updated the website gives an error message that can be corrected by making
a
small change to the master page file(such as adding a space and saving).

Compiler Error Message: BC30260: ''__control2'' is already declared as
''Private Dim __control2 As System.Web.UI.HtmlControls.HtmlLink'' in this
class.

Source Error:
Line 2: <%@ Register TagPrefix="Sagara" Namespace="Sagara.BreadCrumbs"
Assembly="BreadCrumbs" %>
Line 3: <html>
Line 4: <head runat=server>
Line 5: <meta http-equiv="content-type"
content="text/html;charset=ISO-8859-1">
Line 6: <link rel="stylesheet" type="text/css" href="/iris.css">
Source File: E:\TestSite\includes\NoRight.Master

What would cause this error and how can this be prevented?




这篇关于母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆