avatar
JQuery and Master Pages# DotNet - 窗口里的风景
s*z
1
var InputBox = $('#');
这个语句用于一个master page下的content page上。
如果直接用在content page上就行,放在一个external js file 中就不起作用。哪位
专家给解释一下?多谢了!
avatar
s*o
2
The external .js file is not compiled as part of the page, thus, the
ClientID is not "translated" properly.

【在 s*******z 的大作中提到】
: var InputBox = $('#');
: 这个语句用于一个master page下的content page上。
: 如果直接用在content page上就行,放在一个external js file 中就不起作用。哪位
: 专家给解释一下?多谢了!

avatar
s*z
3
Thanks a lot! Is there any solution since I'd like to keep the codes clean?
Or I am stuck with writing the codes inside the content page?

【在 s***o 的大作中提到】
: The external .js file is not compiled as part of the page, thus, the
: ClientID is not "translated" properly.

avatar
t*s
4
pass this id as a parameter

?

【在 s*******z 的大作中提到】
: Thanks a lot! Is there any solution since I'd like to keep the codes clean?
: Or I am stuck with writing the codes inside the content page?

avatar
s*o
5
You could define your function in an external file, and pass the "ClientID %>" as a parameter value when you call it in the page.
It's ok to me to have page-specific JS blocks inside a page.
btw, if you use JavaScript extensively, I suggest switching to ASP.NET MVC.

?

【在 s*******z 的大作中提到】
: Thanks a lot! Is there any solution since I'd like to keep the codes clean?
: Or I am stuck with writing the codes inside the content page?

avatar
s*z
6
目前我的JavaScript用的还不多,但是我越用越觉得它很不错。
因为不是专业程序员,所以担心switching to ASP.NET MVC 会很花时间和精力。

【在 s***o 的大作中提到】
: You could define your function in an external file, and pass the ": ClientID %>" as a parameter value when you call it in the page.
: It's ok to me to have page-specific JS blocks inside a page.
: btw, if you use JavaScript extensively, I suggest switching to ASP.NET MVC.
:
: ?

avatar
s*z
7
var InputBox = $('#');
这个语句用于一个master page下的content page上。
如果直接用在content page上就行,放在一个external js file 中就不起作用。哪位
专家给解释一下?多谢了!
avatar
s*o
8
The external .js file is not compiled as part of the page, thus, the
ClientID is not "translated" properly.

【在 s*******z 的大作中提到】
: var InputBox = $('#');
: 这个语句用于一个master page下的content page上。
: 如果直接用在content page上就行,放在一个external js file 中就不起作用。哪位
: 专家给解释一下?多谢了!

avatar
s*z
9
Thanks a lot! Is there any solution since I'd like to keep the codes clean?
Or I am stuck with writing the codes inside the content page?

【在 s***o 的大作中提到】
: The external .js file is not compiled as part of the page, thus, the
: ClientID is not "translated" properly.

avatar
t*s
10
pass this id as a parameter

?

【在 s*******z 的大作中提到】
: Thanks a lot! Is there any solution since I'd like to keep the codes clean?
: Or I am stuck with writing the codes inside the content page?

avatar
s*o
11
You could define your function in an external file, and pass the "ClientID %>" as a parameter value when you call it in the page.
It's ok to me to have page-specific JS blocks inside a page.
btw, if you use JavaScript extensively, I suggest switching to ASP.NET MVC.

?

【在 s*******z 的大作中提到】
: Thanks a lot! Is there any solution since I'd like to keep the codes clean?
: Or I am stuck with writing the codes inside the content page?

avatar
s*z
12
目前我的JavaScript用的还不多,但是我越用越觉得它很不错。
因为不是专业程序员,所以担心switching to ASP.NET MVC 会很花时间和精力。

【在 s***o 的大作中提到】
: You could define your function in an external file, and pass the ": ClientID %>" as a parameter value when you call it in the page.
: It's ok to me to have page-specific JS blocks inside a page.
: btw, if you use JavaScript extensively, I suggest switching to ASP.NET MVC.
:
: ?

avatar
t*n
13
write the js code in the content page has nothing to do with "keep the code
clean".
In my opinion, you'd better put your js code in the page if jquery selector
is used in your way is a must

?

【在 s*******z 的大作中提到】
: Thanks a lot! Is there any solution since I'd like to keep the codes clean?
: Or I am stuck with writing the codes inside the content page?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。