由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - JQuery and Master Pages
相关主题
ajax,json,jquery怎么自学?MVC is trend?
microsoft为啥放弃aspx网页,转做javascript网页?码农在家上班的机会多吗 (转载)
有哪些方法可以提高网站的perfermance?菜鸟请教web application architecture的问题
如何用ajax实现comments updateRe: 女码工求给些意见或内推。 (转载)
how to make javascript/jquery in asp.net running fast? Thank you!感觉MVC比web form好用多了
我用asp.net写的网站,各位给提提意见Re: Redirecting User to Login Page [fwd
刚看到的有趣观点Re: 请教怎样显示web page?
Free Video Training: ASP.NET MVC 3 Features一个非常奇怪的问题
相关话题的讨论汇总
话题: page话题: js话题: master话题: jquery话题: content
进入DotNet版参与讨论
1 (共1页)
s*******z
发帖数: 422
1
var InputBox = $('#<%=TextBox1.ClientID%>');
这个语句用于一个master page下的content page上。
如果直接用在content page上就行,放在一个external js file 中就不起作用。哪位
专家给解释一下?多谢了!
s***o
发帖数: 2191
2
The external .js file is not compiled as part of the page, thus, the
ClientID is not "translated" properly.

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

s*******z
发帖数: 422
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.

t*****s
发帖数: 124
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?

s***o
发帖数: 2191
5
You could define your function in an external file, and pass the "<%= Id.
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?

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

【在 s***o 的大作中提到】
: You could define your function in an external file, and pass the "<%= Id.
: 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
发帖数: 422
7
var InputBox = $('#<%=TextBox1.ClientID%>');
这个语句用于一个master page下的content page上。
如果直接用在content page上就行,放在一个external js file 中就不起作用。哪位
专家给解释一下?多谢了!
s***o
发帖数: 2191
8
The external .js file is not compiled as part of the page, thus, the
ClientID is not "translated" properly.

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

s*******z
发帖数: 422
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.

t*****s
发帖数: 124
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?

s***o
发帖数: 2191
11
You could define your function in an external file, and pass the "<%= Id.
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?

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

【在 s***o 的大作中提到】
: You could define your function in an external file, and pass the "<%= Id.
: 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.
:
: ?

t********n
发帖数: 728
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?

1 (共1页)
进入DotNet版参与讨论
相关主题
一个非常奇怪的问题how to make javascript/jquery in asp.net running fast? Thank you!
Answer Re: ASP.NET 难题测试 (1)我用asp.net写的网站,各位给提提意见
MS SQL Report Server Questions刚看到的有趣观点
datagrid怎样打印(paging)Free Video Training: ASP.NET MVC 3 Features
ajax,json,jquery怎么自学?MVC is trend?
microsoft为啥放弃aspx网页,转做javascript网页?码农在家上班的机会多吗 (转载)
有哪些方法可以提高网站的perfermance?菜鸟请教web application architecture的问题
如何用ajax实现comments updateRe: 女码工求给些意见或内推。 (转载)
相关话题的讨论汇总
话题: page话题: js话题: master话题: jquery话题: content