代码隐藏与代码内部有什么区别/优势? [英] What's the difference/advantages between code behind and code inside?

查看:61
本文介绍了代码隐藏与代码内部有什么区别/优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


新手在这里,所以请原谅可能是一个基本问题...


我看到很多讨论关于代码隐藏,如果我正确地理解了
,则意味着脚本代码在HTML中的单独文件

中。除了明显的优势,如果你有一个单独的

设计师和程序员,那么代码背后还有其他优势吗?


大多数东西我都是'到目前为止看到使用的代码,但这可能是

因为我还在阅读介绍和教程。对我来说看起来很合理

,因为所有代码都在一个文件中(我不能雇用一个

设计师!!),虽然方便地分成几个部分。


那么,代码背后的优势是什么?预先感谢所有和任何

(有用的)回复。


-

Alan Silver

(此行下面添加的任何内容都与我无关)

Hello,

Newbie here, so please forgive what is probably a basic question ...

I see a lot of discussion about "code behind", which if I have
understood correctly, means that the script code goes in a separate file
from the HTML. Apart from the obvious advantage if you have a separate
designer and programmer, are there any other advantages to code behind?

Most of the stuff I''ve seen so far uses code inside, but that''s probably
because I''m still reading introductions and tutorials. It looks sensible
to me, as all the code is in one file (I can''t afford to employ a
designer!!), albeit conveniently separated into sections.

So, any advantage of code behind? Thanks in advance for all and any
(helpful) responses.

--
Alan Silver
(anything added below this line is nothing to do with me)

推荐答案

根据报告我已经阅读过2中的两个术语没有区别

的性能


我个人提到使用后面的代码,因为它更像是VB编辑器我曾经用过但是我猜由你决定


希望这会有所帮助



" Alan Silver" <人********* @ nospam.thanx>在留言中写道

新闻:ls ************** @ nospamthankyou.spam ...
According to reports ive read there is no difference between the 2 in terms
of performance

I personally refer to use code behind as its more like the VB editors im
used to but i guess its up to you

Hope this helps


"Alan Silver" <al*********@nospam.thanx> wrote in message
news:ls**************@nospamthankyou.spam...
你好,
<这里有新手,所以请原谅可能是一个基本问题...

我看到很多关于背后代码的讨论,如果我理解正确的话,表示脚本代码与
HTML的单独文件相同。除了明显的优势,如果你有一个单独的设计师和程序员,那么代码背后还有其他优势吗?

我见过的大部分内容都使用了代码,但那可能是因为我还在阅读介绍和教程。对我来说这看起来很合理,因为所有代码都在一个文件中(我不能雇用一个
设计师!!),虽然方便地分成几个部分。
那么,代码背后的优势是什么?提前感谢所有和任何
(有用的)回复。

-
Alan Silver
(此行下面添加的任何内容都与我无关)
Hello,

Newbie here, so please forgive what is probably a basic question ...

I see a lot of discussion about "code behind", which if I have understood
correctly, means that the script code goes in a separate file from the
HTML. Apart from the obvious advantage if you have a separate designer and
programmer, are there any other advantages to code behind?

Most of the stuff I''ve seen so far uses code inside, but that''s probably
because I''m still reading introductions and tutorials. It looks sensible
to me, as all the code is in one file (I can''t afford to employ a
designer!!), albeit conveniently separated into sections.

So, any advantage of code behind? Thanks in advance for all and any
(helpful) responses.

--
Alan Silver
(anything added below this line is nothing to do with me)



可以在网站上更改页内脚本,而无需重新部署整个

应用程序。


代码隐藏让你以常规的专业方式编写程序模块。


Eliyahu


" Alan Silver" <人********* @ nospam.thanx>在留言中写道

新闻:ls ************** @ nospamthankyou.spam ...
In-page script can be changed on the site without re-deploying the whole
application.

Code behind lets you write program modules in a regular professional way.

Eliyahu

"Alan Silver" <al*********@nospam.thanx> wrote in message
news:ls**************@nospamthankyou.spam...
你好,
<这里有新手,所以请原谅可能是一个基本问题...

我看到很多关于背后代码的讨论,如果我已经正确理解了,意味着脚本代码与HTML单独存在文件。除了明显的优势,如果你有一个单独的设计师和程序员,那么代码背后还有其他优势吗?

我见过的大部分内容都使用了代码,但那可能是因为我还在阅读介绍和教程。对我来说这看起来很合理,因为所有代码都在一个文件中(我不能雇用一个
设计师!!),虽然方便地分成几个部分。
那么,代码背后的优势是什么?提前感谢所有和任何
(有用的)回复。

-
Alan Silver
(此行下面添加的任何内容都与我无关)
Hello,

Newbie here, so please forgive what is probably a basic question ...

I see a lot of discussion about "code behind", which if I have
understood correctly, means that the script code goes in a separate file
from the HTML. Apart from the obvious advantage if you have a separate
designer and programmer, are there any other advantages to code behind?

Most of the stuff I''ve seen so far uses code inside, but that''s probably
because I''m still reading introductions and tutorials. It looks sensible
to me, as all the code is in one file (I can''t afford to employ a
designer!!), albeit conveniently separated into sections.

So, any advantage of code behind? Thanks in advance for all and any
(helpful) responses.

--
Alan Silver
(anything added below this line is nothing to do with me)



阅读的便利性对我来说已经足够....


仅供参考,在新VS中你应该是能够按下按钮并将您的

型号从代码隐藏切换到内联或后退。


-

Curt Christianson

网站&脚本: http://www.Darkfalz.com

博客: http://blog.Darkfalz.com

" Alan Silver <人********* @ nospam.thanx>在留言中写道

新闻:ls ************** @ nospamthankyou.spam ...
ease of reading is enough for me....

FYI, in the new VS you should be able to "push a button" and switch your
model from code-behind to in-line or back again.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Alan Silver" <al*********@nospam.thanx> wrote in message
news:ls**************@nospamthankyou.spam...
你好,
<这里有新手,所以请原谅可能是一个基本问题...

我看到很多关于背后代码的讨论,如果我理解正确的话,表示脚本代码与
HTML的单独文件相同。除了明显的优势,如果你有一个单独的设计师和程序员,那么代码背后还有其他优势吗?

我见过的大部分内容都使用了代码,但那可能是因为我还在阅读介绍和教程。对我来说这看起来很合理,因为所有代码都在一个文件中(我不能雇用一个
设计师!!),虽然方便地分成几个部分。
那么,代码背后的优势是什么?提前感谢所有和任何
(有用的)回复。

-
Alan Silver
(此行下面添加的任何内容都与我无关)
Hello,

Newbie here, so please forgive what is probably a basic question ...

I see a lot of discussion about "code behind", which if I have understood
correctly, means that the script code goes in a separate file from the
HTML. Apart from the obvious advantage if you have a separate designer and
programmer, are there any other advantages to code behind?

Most of the stuff I''ve seen so far uses code inside, but that''s probably
because I''m still reading introductions and tutorials. It looks sensible
to me, as all the code is in one file (I can''t afford to employ a
designer!!), albeit conveniently separated into sections.

So, any advantage of code behind? Thanks in advance for all and any
(helpful) responses.

--
Alan Silver
(anything added below this line is nothing to do with me)



这篇关于代码隐藏与代码内部有什么区别/优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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