开发者

Does JavaScript create issues when we implement master pages

Does JavaScript create an issue when we implement master pages?

It seems to me that it is quite tough to maintain and implement JavaScript on an application where we have used master pages. Is there any shortcut or the other wa开发者_JS百科y round to it?


Hai HotTester,

The Major issue would be finding ClientId's of controls used in your application.


There are no javascript issues when using master pages in asp.net unless you create some. ;)

While writing javascript you should see the final html generated when the page is processed and work on that html rather than thinking in terms of master page or content pages. You can put your common javascript functions in the master page so that it can be accessed in all the content pages. Also I would recommend putting all your javascript in an external file and including it in the master page. This is a good practice.

If you are facing some issues you can post the specific problem and we can try and solve them.

All the best...


There is no issue with finding of ClientID's in MasterPages in ASP.Net 3.5... As the content page has its own head tag unlike ASP.Net 2.0

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜