How to explain this? Something wrong in the web page source - asp.net

This is really hard to tell but I will give a try.
I am developing a website using ASP.NET on VS2010 IDE. After Running my web site on my local computer the page works properly.
Once, I wanted to see the resource code on the browser (Mozilla Firefox 20). Well Nothing was looking wrong. Let me share my web page's <head> part:
<link href="../../Styles/Site.css" rel="stylesheet" type="text/css" />
<link href="Scripts/jquery.hoverIntent.minified.js" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery.hoverIntent.minified.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="Scripts/superfish.js" type="text/javascript"></script>
Now hold tight!
When I click on a path (for example: Scripts/jquery.hoverIntent.minified.js), I will show you what happens then:
<link href="../../../Styles/Site.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery.hoverIntent.minified.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="Scripts/superfish.js" type="text/javascript"></script>
Normally the browser opens the js file's content in the code view, but here it prepends a ../ to the ../../Styles/Site.css. The more I click the more it adds.
Is there any logical explanation of this behaviour? I have tried it in Firefox and Chrome.
By the way I am using UrlRewritingNet.UrlRewriter.dll add-on.

My best guess is that the URL gets rewritten during the request. Perhaps UrlRewritingNet.UrlRewriter.dll is to blame for this?

Related

Implement JSX in Wordpress

I would like to implement JSX Graph on my wordpress website and installed the plugin in the way you recommended. But if you have a look at the website and scroll down you only see the frame of the JSXGraph applet but not the grid etc. So what can I do to display it right? Here is the code:
<p><script type="text/javascript"><br />
var board = JXG.JSXGraph.initBoard('box', {boundingbox: [-10, 10, 10, -10], axis:true});<br />
</script></p>
and in the head
<link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
<script type="text/javascript" src="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
Oops, this is outdated information. Since your wordpress runs with https, also JSXGraph must be included using https. Please, remove http: from the links like this:
<link rel="stylesheet" type="text/css" href="//jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" />
<script type="text/javascript" src="//jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js"></script>
Best wishes,
Alfred

How can I automatically render the many script tags depending on environment using the new Asp BundlerMinifier?

At the moment, I am using the NuGet package which allows me to define large bundles with many JS files,
bundles.Add(new ScriptBundle("~/Bundles/js/PartOfMyGiantAngularApp").Include(
// messages
"~/App/messages/service/messageCache.module.js",
"~/App/messages/service/messageCache.service.js",
"~/App/messages/message-list/message-list.module.js",
"~/App/messages/message-list/message-list.component.js",
"~/App/messages/message-detail/message-detail.module.js",
"~/App/messages/message-detail/message-detail.component.js",
"~/App/messages/message-edit/message-edit.module.js",
"~/App/messages/message-edit/message-edit.component.js",
"~/App/messages/message-create/message-create.module.js",
"~/App/messages/message-create/message-create.component.js",
"~/App/messages/message.module.js"
)
and the pull them all into my main html file:
#Scripts.Render("~/Bundles/js/PartOfMyGiantAngularApp.js")
Which will either produce one file in production:
<script src="/Bundles/js/PartOfMyGiantAngularApp.js"></script>
, or in dev it will render multiple script tags.
<script src="/App/messages/service/messageCache.module.js"></script>
<script src="/App/messages/service/messageCache.service.js"></script>
<script src="/App/messages/message-list/message-list.module.js"></script>
<script src="/App/messages/message-list/message-list.component.js"></script>
<script src="/App/messages/message-detail/message-detail.module.js"></script>
<script src="/App/messages/message-detail/message-detail.component.js"></script>
<script src="/App/messages/message-edit/message-edit.module.js"></script>
<script src="/App/messages/message-edit/message-edit.component.js"></script>
<script src="/App/messages/message-create/message-create.module.js"></script>
<script src="/App/messages/message-create/message-create.component.js"></script>
<script src="/App/messages/message.module.js"></script>
How do we get this automatic multiple files in dev mode when using the new build-time Bundler/Minifier without having to both specify each file in my bundle config AND in the main HTML page with an environment tag?
I want it to just work out the paths and give them to be just like the old one. It's hard to debug a single line of JS code when I have no idea which file it's from.
It's written very nicely here:
https://learn.microsoft.com/en-us/aspnet/core/client-side/bundling-and-minification?tabs=visual-studio%2Caspnetcore2x
Under: Environment-based bundling and minification
That we will have to do things like this:
<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
This is a horrible solution when I have a lot of JS files!
I believe you want to disable bundling.
In your RegisterBundles method (BundleConfig class in the App_Start folder).
Add this, it will disable bundling
BundleTable.EnableOptimizations = false;

Meteor play YouTube videos on popup

is there any option to play youtube videos popup window in Meteor.
im using adrianliaw:youtube-iframe-api to play videos
included these two in
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/redmond/jquery-ui.css" rel="stylesheet" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
and i downloaded jquery.youtubepopup.min.js file and included as below
<script type="text/javascript" src="jquery.youtubepopup.min.js"></script>
finally in my html
<a class="youtube" href="http://www.youtube.com/watch?v=4eYSpIz2FjU">title</a>
on Templte onRendered() in initializing like this $("a.youtube").YouTubePopup(options);
referred link http://lab.abhinayrathore.com/jquery_youtube/#Examples but dint worked for me
Thanks
Manju

Picasa iFrame Slideshow

Is there an iFrame slideshow to show a Picasa Album? I'm running Joomla! so an iFrame is a whole lot easier to work with. Any ideas? If you could do Google+ albums instead that would be fine.
Try this,
You can use Picasa Webalbum Integrator for your requirement.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<link href="css/pwi.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery.pwi.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#container").pwi({
username: 'tester'
});
});
</script>
or something like,
<IFRAME SRC="(album link)#slideshow" WIDTH=800 HEIGHT=600 SCROLLING=NO>
</IFRAME>
Hope it helps..
Joomla also has an API for Picasa so you can easily write a plugin using that, assuming this is a programming question :).

asp.net webform routing problem with javascript

I am using asp.net 4 routing and im enjoying it so far. I have one problem only with my javascript files.
I am using a masterpage to add my css and javascript. The css is working fine however the javascript is not.
My links from my masterpage look like this
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="~/_styles/css/core.css" rel="stylesheet" type="text/css" />
<link href="~/_styles/css/facebox.css" rel="stylesheet" type="text/css" />
<script src="~/_styles/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="~/_styles/js/jquery.validate.js" type="text/javascript"></script>
<script src="~/_styles/js/facebox.js" type="text/javascript"></script>
<script src="~/_styles/js/corejs.js" type="text/javascript"></script>
Why does my css load correctly but the js doesnt?
This is question is bit old..but i faced same situation using ASP.NET 4.0 routing and referencing different js file or stylesheet when you move from different directory structure.. what i used to resolve is:
<script src='<%=ResolveClientUrl("~/js/fancybox/jquery.fancybox-1.3.4.js")%>' type="text/javascript"></script>
So key was using ResolveClientUrl
Hope this helps people in future.
Please check and make sure when you adding the link for your script.You just type the
<script src=" and Ctrl+Space then choose your file.If you can't find your project path,just try it to get in that path.Sometime,the file will not in that path when you may be copy & paste that file to your project path(not from your VS Project explorer).
you can use simply _styles/js and _styles/css.

Resources