I am in a problem to access user control(.ascx) on a .aspx page
the following is my scenario
I have following directory structure -
Autoboom
- workshop
-- WSFirst
-showroom
-help
i have a user control help.ascx in folder /autoboom/help
i have registered this control in web.config like this -
<controls>
<add tagPrefix="HELP " tagName="HELP" src="~/Help/Help.ascx" />
</controls>
my problem is the help.ascx is working in any folder with same hierarchy of
help folder
for example it is working in autoboom/Workshop and autoboom/showroom
but it is not working in one folder up like /autoboom and one folder down
like /autoboom/workshop/WSFirst
i have already tried to register help control in the same page instead of
web.config but still not working
please suggest me where i am doing wrong
Thanks in advance
-BL 4 2108
"Now working" means???????
Any errors???? Or it's just not doing laundry?
George.
"BL" <BL@discussions .microsoft.comw rote in message
news:C8******** *************** ***********@mic rosoft.com...
>I am in a problem to access user control(.ascx) on a .aspx page
the following is my scenario
I have following directory structure -
Autoboom
- workshop
-- WSFirst
-showroom
-help
i have a user control help.ascx in folder /autoboom/help
i have registered this control in web.config like this -
<controls>
<add tagPrefix="HELP " tagName="HELP" src="~/Help/Help.ascx"
/>
</controls>
my problem is the help.ascx is working in any folder with same hierarchy
of
help folder
for example it is working in autoboom/Workshop and autoboom/showroom
but it is not working in one folder up like /autoboom and one folder down
like /autoboom/workshop/WSFirst
i have already tried to register help control in the same page instead of
web.config but still not working
please suggest me where i am doing wrong
Thanks in advance
-BL
not any error, also i can debug it, but it is not doing his work, like on
mouse over it should display a tooltip but it is not displaying, also it is
displaying a 'X" sign instead of "?" image
Thanks for responce
-BL
"George Ter-Saakov" wrote:
"Now working" means???????
Any errors???? Or it's just not doing laundry?
George.
"BL" <BL@discussions .microsoft.comw rote in message
news:C8******** *************** ***********@mic rosoft.com...
I am in a problem to access user control(.ascx) on a .aspx page
the following is my scenario
I have following directory structure -
Autoboom
- workshop
-- WSFirst
-showroom
-help
i have a user control help.ascx in folder /autoboom/help
i have registered this control in web.config like this -
<controls>
<add tagPrefix="HELP " tagName="HELP" src="~/Help/Help.ascx"
/>
</controls>
my problem is the help.ascx is working in any folder with same hierarchy
of
help folder
for example it is working in autoboom/Workshop and autoboom/showroom
but it is not working in one folder up like /autoboom and one folder down
like /autoboom/workshop/WSFirst
i have already tried to register help control in the same page instead of
web.config but still not working
please suggest me where i am doing wrong
Thanks in advance
-BL
You problem is quite easy.
you are using relative path when referencing needed JavaScript and images.
And you should be using absolute path....
Here is the small tutorial
Page url: http://www.mysite.com/autoboom/workshop/mypage.aspx
has a reference to <img src="image/myimage.gif">
this is relative path and browser will make a request for http://www.mysite.com/autoboom/works...ge/myimage.gif
which will probably not be found.
If you had <img src="/image/myimage.gif"(No tice first slash)
browser will look for http://www.mysite.com/image/myimage.gif
which is probably what you wanted....
George.
"BL" <BL@discussions .microsoft.comw rote in message
news:0C******** *************** ***********@mic rosoft.com...
not any error, also i can debug it, but it is not doing his work, like on
mouse over it should display a tooltip but it is not displaying, also it
is
displaying a 'X" sign instead of "?" image
Thanks for responce
-BL
"George Ter-Saakov" wrote:
>"Now working" means???????
Any errors???? Or it's just not doing laundry?
George.
"BL" <BL@discussions .microsoft.comw rote in message news:C8******* *************** ************@mi crosoft.com...
>I am in a problem to access user control(.ascx) on a .aspx page
the following is my scenario
I have following directory structure -
Autoboom
- workshop
-- WSFirst
-showroom
-help
i have a user control help.ascx in folder /autoboom/help
i have registered this control in web.config like this -
<controls>
<add tagPrefix="HELP " tagName="HELP"
src="~/Help/Help.ascx"
/>
</controls>
my problem is the help.ascx is working in any folder with same
hierarchy
of
help folder
for example it is working in autoboom/Workshop and autoboom/showroom
but it is not working in one folder up like /autoboom and one folder
down
like /autoboom/workshop/WSFirst
i have already tried to register help control in the same page instead
of
web.config but still not working
please suggest me where i am doing wrong
Thanks in advance
-BL
George,
Thank you for your support, now it is working
Thanks again
BL
"George Ter-Saakov" wrote:
You problem is quite easy.
you are using relative path when referencing needed JavaScript and images.
And you should be using absolute path....
Here is the small tutorial
Page url: http://www.mysite.com/autoboom/workshop/mypage.aspx
has a reference to <img src="image/myimage.gif">
this is relative path and browser will make a request for http://www.mysite.com/autoboom/works...ge/myimage.gif
which will probably not be found.
If you had <img src="/image/myimage.gif"(No tice first slash)
browser will look for http://www.mysite.com/image/myimage.gif
which is probably what you wanted....
George.
"BL" <BL@discussions .microsoft.comw rote in message
news:0C******** *************** ***********@mic rosoft.com...
not any error, also i can debug it, but it is not doing his work, like on
mouse over it should display a tooltip but it is not displaying, also it
is
displaying a 'X" sign instead of "?" image
Thanks for responce
-BL
"George Ter-Saakov" wrote:
"Now working" means???????
Any errors???? Or it's just not doing laundry?
George.
"BL" <BL@discussions .microsoft.comw rote in message
news:C8******** *************** ***********@mic rosoft.com...
I am in a problem to access user control(.ascx) on a .aspx page
the following is my scenario
I have following directory structure -
Autoboom
- workshop
-- WSFirst
-showroom
-help
i have a user control help.ascx in folder /autoboom/help
i have registered this control in web.config like this -
<controls>
<add tagPrefix="HELP " tagName="HELP"
src="~/Help/Help.ascx"
/>
</controls>
my problem is the help.ascx is working in any folder with same
hierarchy
of
help folder
for example it is working in autoboom/Workshop and autoboom/showroom
but it is not working in one folder up like /autoboom and one folder
down
like /autoboom/workshop/WSFirst
i have already tried to register help control in the same page instead
of
web.config but still not working
please suggest me where i am doing wrong
Thanks in advance
-BL
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: choihead |
last post by:
Hi all,
My system setup ios W2k3 + ASP.NET+C#=MCMS Server as code behind
I have a console <aaa.ascx> will popup a new window for then to choose some
function when user right click, I want to add a function which execute a
batch file on server, I used
System.Diagnostics.Process.Start("c:\\inetpub\\wwwroot\\abc.bat") but it
doesn't execute the script inside. ok, now comes my questions, as i am a
newbie to C#, hope you guys dun think I am...
|
by: James Glover |
last post by:
I need to be able to reference a variable that is set in the code behind of
an aspx page in a user control embedded on the page.
An example:
The code behind sets a position number; say ,1 to 5. The included user
control is expecting that variable to know which element to highlight. (The
first through tenth LI tag in this example.)
|
by: Dave |
last post by:
Greetings,
I have a web application that has a folder with a section of my web
application. How can I reference a user control that is one level up in the
directory structure?
<%@ Register TagPrefix="PHM" Tagname="HeaderMenu" src="HeaderMenu.ascx" %>
but, "HeaderMenu.ascx" is in the parent folder of the folder this aspx
document is in.
|
by: Dranreb |
last post by:
Hello,
I use a template whereby my default page contains various user controls -
i.e. "Header", "Footer", "Navigation", "Content".
On some occaisions I'd like to manipulate the other controls from the
content control, without refreshing the default page. Currently, to change
the content I refresh the default page by doing a response.redirect and
referencing the new content page in the querystring. My default page
includes the...
|
by: rmccinc |
last post by:
Hello-
I am missing something very easy here I think.
I have 3 files
test.master.vb (Master)
content.aspx.vb (content)
Control.ascx.vb (user Control)
| |
by: kens |
last post by:
I've found some odd behavior in dynamically loaded user controls under
ASP.NET 2.0. Specifically, if I load a control dynamically, in the
"Page_Load" event, the code-behind for the user control is unable to
access any of the web controls on the user control, as they are null.
Specifically, I have this user control, TestControl.ascx:
<%@ Control Language="C#" AutoEventWireup="true"
CodeFile="TestControl.ascx.cs" Inherits="TestControl" %>...
|
by: mivhaelveloz |
last post by:
Hiya
Im trying to get a user control working in mono/ASP.NET.
....I have no problem getting a basic control up and working and using
it declaratively in a hosting page's .aspx file.
But for the life of me I can't figure out how to access that control
from the hosting page's code behind file. That is, I would like to set
some of the properties of that control at runtime (say, in Page_Load)
|
by: mivhaelveloz |
last post by:
Hiya
Im trying to get a user control working in mono/ASP.NET.
....I have no problem getting a basic control up and working and using
it declaratively in a hosting page's .aspx file.
But for the life of me I can't figure out how to access that control
from the hosting page's code behind file. That is, I would like to set
some of the properties of that control at runtime (say, in Page_Load)
instead of setting the to hardcoded values in...
|
by: Jared |
last post by:
Hi
I have been looking for a few hours and couldn't find much in these
groups, so I thought I would post it here in case anybody else is
trying to figure it out.
I have an ascx User control with an attribute called 'Value'. I want
to set this at run time from a class with App_Code. I pass the control
to the class as a generic Control (called myData.FormControl here). I
am setting the 'Value' attribute to the string held in
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |