We help IT Professionals succeed at work.
Get Started

Problem with .ashx file

vedant0500 asked
Last Modified: 2012-05-09
i am using autocomplete/autosuggest textbox which reside in usercontrol form.

My problem is that it when i drag this user control to anyother page in any other directory it does not work but when dragged in same directory where my usercontrol page reside it works fine

I think it the issue related with directory but i changed the .ashx file path but still does not work

Below is the code which works fine when kept in a same directory let's say "abc"
means it contains 3 files
1.     .aspx page
2.     .ashx page
3.     .ascx page

<%@ Register Src="SearchBox.ascx" TagName="SearchBox" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <uc1:SearchBox ID="SearchBox1" runat="server" />

but when i drag the user control to anyother page which is in another directory lets say "xyz"
which contains
only my .aspx page

in that scenario it does not work

below is my .ascx file in which my logic reside

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchBox.ascx.cs" Inherits="SearchBox" %>

<link href="scripts/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
<script src="scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="scripts/jquery.autocomplete.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
<style type="text/css">
        width: 130px;
<div class="abcd">
    <asp:TextBox ID="txtSearch" runat="server" AutoCompleteType="Disabled"></asp:TextBox>

please help on the same,Thanks

Watch Question
This problem has been solved!
Unlock 1 Answer and 13 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE