?
Solved

Why won't jquery-ui library load into my asp.net web page?

Posted on 2014-07-27
1
Medium Priority
?
971 Views
Last Modified: 2014-07-27
Hi:

I have an ASP.net application.
The application uses the standard ASP.net template out of the box (with master page & content).

The application uses the AjaxControlToolkit TabContainer control.
I also make use of the jquery.js and jquery-ui libraries.

I'm running into some weird issues with the combination of the AjaxControlToolkit, jquery and jquery-ui.
It all seems to be related to where the libraries get included in the aspx pages.

1) If I load the jquery and jquery-ui libraries in the default page's <asp:Content>, then the jquery-ui library
    does not load. I look in developer tools (Chrome) and there are no errors. I look at the scripts that get loaded,
    and jquery-ui does not get loaded.

Consider the following:
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" />
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" />

Open in new window

2) To try to fix this, I tried moving around where I actually load the libraries. If I load the jquery library on the master page and load the jquery-ui on my default page, then it seems that jquery-ui gets loaded. However
the jquery library seems to somehow clash with the TabContainer
<--- This is from Site.Master.aspx -->
<head id="Head1" runat="server">
    <title></title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>

<--- This is from default.aspx -->
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" />

Open in new window

When I do the above, the
TabContainer functions correctly, but I lose all my styles

So my question is "How/Where do I include jquery and jquery-ui so they get loaded correctly
with my web page with colliding with the AjaxControlToolkit  TabContainer?

Thanks,
JohnB
0
Comment
Question by:jxbma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
jxbma earned 0 total points
ID: 40222769
Really?
Really?
    <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" ></script>
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" ></script>

Open in new window

instead of this:
 <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" />
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" />

Open in new window

Fixed the issue?
Really?
That took 3 hours to figure out.
0

Featured Post

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question