Monday, December 22, 2008

Set Script src from root folder (dynamic)

if u are working with master pages and u are using javascript menus on master to navigate child pages in content place holder.
for that u need to save java script code in a particular folder and give path of that file in master page but as we know that path gets change when ever we go up and down in hierarchical of pages then that menu got disappear because of static path of .js file so we need to give dynamic path for java script file..and to do so we need to write following code to get dynamic path which can work in hierarchical up and down.

below code in design view of master page
< script type="text/javascript" src=" < %# Page.ResolveClientUrl("~/images/right_menu/data.files/rolen.js")% > " > < /script >

and following code in page load of master page
Page.Header.DataBind();

Share This!


14 comments:

Anonymous said...

Іt's hard to find well-іnformed people on this subject, however, you
sound like yⲟu know what you're talking about!
Thanks
view it : Times Are Changing: How Ꭲo Lock Fileѕ New Skills

Anonymous said...

Grееtings from Carolina! I'm bored at work so I deciԀed to browse your website on my
iphone during lunch break. I enjoy the info yoᥙ prеsеnt here and can't wait to tаke
a look when I get home. I'm surprised at how faѕt your bⅼog loaded on my mobile
.. I'm not even using WIFI, just 3G .. Anyways, fantastic
site!
read һere : Yօu Knew How To Lock Files Ᏼut You Forgot.
Here Is A Rеminder

Anonymous said...

Ηeʏ there! This is my 1st comment here so I just ԝanted to give
a quick sh᧐ut out and say І genuinely enjoy reading your posts.

Can you sᥙggest any other blogs/websites/forums
that go over the same subjectѕ? Thank you
so much!
neⲭt pаge : Five Ways To Avoid Encryption Software
Bᥙrnout & Three Reɑsons You Wiⅼl Never Be Able To
How To Encrypt A Pasѕw᧐rd For Free Like Warren Buffet

Anonymous said...

I just could not leave your web site before suggesting that I extremely loved the usual information an individual provide for your visitors?
Is going to be back ceaselessly in order to check out new posts

Anonymous said...

When I initially left a comment I appear to have clicked on the -Notify me when new comments
are added- checkbox and from now on whenever a comment is added I receive 4 emails with the same comment.
There has to be a way you can remove me from that service?
Kudos!

Anonymous said...

Right here is the perfect webpage for anyone who wishes to understand this topic.

You understand a whole lot its almost hard to argue with you (not
that I personally will need to…HaHa). You certainly put a new spin on a subject
that's been written about for a long time.
Great stuff, just excellent!

Anonymous said...

It's actually very complicated in this busy life to listen news
on TV, therefore I just use world wide web for that reason, and get the most up-to-date information.

Anonymous said...

Hey There. I discovered your weblog the use of msn. That is an extremely well written article.
I will be sure to bookmark it and come back to read extra
of your helpful information. Thanks for the post.
I'll definitely comeback.

Anonymous said...

Quality posts is the secret to interest the visitors
to go to see the web page, that's what this web page is providing.

Anonymous said...

Wonderful blog you have here but I was wanting to know if you
knew of any discussion boards that cover the same topics talked about here?
I'd really like to be a part of group where I can get opinions from other experienced
individuals that share the same interest. If you have any recommendations,
please let me know. Appreciate it!

Anonymous said...

Fantastic goods from you, man. I have understand your stuff previous to and
you're just too magnificent. I actually like what
you have acquired here, really like what you're saying and the
way in which you say it. You make it entertaining and you still take care of to keep it wise.
I can not wait to read far more from you. This is actually a terrific site.

Anonymous said...

Hello to all, the contents existing at this web page are actually remarkable for
people experience, well, keep up the good work fellows.

Anonymous said...

Great post. I used to be checking constantly this weblog
and I'm impressed! Very useful info particularly the closing part :)
I handle such information much. I used to be seeking this certain info for a long time.
Thanks and best of luck.

Anonymous said...

Very nice write-up. I definitely love this website.
Stick with it!

Powered By Blogger · Designed By Seo Blogger Templates