Click here to Skip to main content
13,045,387 members (79,725 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi this is my code, in ascx file. There is problem in it. It seems that it dosen't understand Javascript!

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CriteriaControl.ascx.cs" Inherits="Controls_CriteriaControl" %>
<link href="../Stylesheet/table.css" rel="stylesheet" type="text/css" />
<link href="../Stylesheet/Button.css" rel="stylesheet" type="text/css" />
<link href="../Stylesheet/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../JavaScript/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../JavaScript/jquery-ui-1.8.21.custom.min.js"></script>
<script language="javascript" type="text/javascript">
    $(function () {
                    primary: "ui-icon-help"
                text: false
            $(function () {
                var moveLeft = 20;
                var moveDown = 10;
                $('#help-icon').hover(function (e) {
                        function () {
                $('.help-icon').mousemove(function (e) {
                    $("div#pop-up").css('top', e.pageY + moveDown).css('left', e.pageX + moveLeft);
    $(function () {
            range: true,
            min: 0,
            max: 100,
            values: [0, 100],
            slide: function (event, ui) {
        $("#amount1").val($("#slider-range").slider("values", 0));
        $("#amount2").val($("#slider-range").slider("values", 1));

<div class="divTable">
    <div class="divRow">
        <div class="divCell">
            <input type="text" id="lable" value="something" readonly="readonly"/>
            <button id="help-icon" style="width:13px ; height:13px">help</button>
            <div id="pop-up" class="divCell">
                loading...Say what u want!
        <div class="divCellmine">
            <label for="amount1">min:</label>
            <input type="text" id="amount1" style="border:0; font-weight:bold;" />
           <div class="divCellmine">
        <div id="slider-range" style="width: 142px; height: 1px"></div>
        <div class="divCellmine">
            <label for="amount2">max:</label>
            <input type="text" id="amount2" style="border:0; font-weight:bold;" />

this code has a lable, a button , a slider that by changing its handler two lables are changed...

I'd be glad to help me...
Posted 3-Jul-12 4:12am
priyanka Dhoble 3-Jul-12 10:22am
Can you explain the problem in more detail? Is it throwing some error? Is the control dynamically loaded on page?
Sandeep Mewara 3-Jul-12 10:28am
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.
Shemeer NS 3-Jul-12 10:29am
What problem exactly you are facing? What's going wrong this code?
bahar_Agi 3-Jul-12 23:44pm
In fact I want to write a dynamic user control with JQuery to be client side. but it has problem in ascx. I know it is obvious that it doesn't work in a server side page.But the problem is: I don't know how to write a client side dynamic user control...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Remove the jQuery script tags and the jQuery functions and place them into the Page instead of the user control. It will work..
aspnet_regiis 3-Jul-12 10:54am
In that case you need to specify the path to the jQuery library from the root of the website folder

For e.g.

<script type="text/javascript" src="~/MyScripts/JavaScript/jquery-1.7.2.js"></script>
<script type="text/javascript" src="~/MyScripts/JavaScript/jquery-ui-1.8.21.custom.min.js"></script>

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 3 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100