如果我们在我们的网站上使用母版页,那么我们在其中编写javascript编码 [英] If we are using master page in our website then where we write javascript coding

查看:97
本文介绍了如果我们在我们的网站上使用母版页,那么我们在其中编写javascript编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个母版页和两个内容页.我只是想使用javascript进行登录验证.head标记仅出现在母版页中,而我们只是在head标记中编写我们的javascript代码.如果我在head标记中编写编码,那么它可能会影响另一个内容页面.在哪里写我们的javascript代码的条件

i wanted to create one master page and two content pages. i just want to use javascript for login validation .head tag is just appear in master page only and we r just writing our javascript code in head tag .and if i write coding in head tag then it may affect on another content page .so in that condition where to write our javascript code

推荐答案

当我们在aspx页面中使用母版页时,有两个contentplaceholder.
您可以创建新的contentplaceholder并在其中编写Javascript.
Hi when we use master page in our aspx page there are two contentplaceholder.
you can create new contentplaceholder and write there your Javascript.


请参阅以下有关该主题的系列文章.

http://www.dotnetcurry.com/ShowArticle.aspx?ID=273

http://www.dotnetcurry.com/ShowArticle.aspx?ID=274
Have a look at below series of Articles on this Topic.

http://www.dotnetcurry.com/ShowArticle.aspx?ID=273

http://www.dotnetcurry.com/ShowArticle.aspx?ID=274


在您的页面中必须有两个contentplaceholder一个头&第二个Maincontent将ur javascript放在
第一部分是head
in ur page there must be two contentplaceholder one head & second Maincontent place ur javascript in
first section that is head


这篇关于如果我们在我们的网站上使用母版页,那么我们在其中编写javascript编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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