473,385 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Web User Control

When i try to run the web page that contains a custom web
user control '.ascx.' file i get the following error:

The type of page you have requested is not served because
it has been explicitly forbidden. The extension '.ascx'
may be incorrect.

What is wrong?

Thanks
Nov 18 '05 #1
4 1992
show how you are calling the ASCX

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Angel" <as****@hotmail.com> wrote in message
news:00****************************@phx.gbl...
When i try to run the web page that contains a custom web
user control '.ascx.' file i get the following error:

The type of page you have requested is not served because
it has been explicitly forbidden. The extension '.ascx'
may be incorrect.

What is wrong?

Thanks

Nov 18 '05 #2
Ascx controls aren't meant to be served, as the message indicates, they are
meant to be consumed by aspx pages. How are you including this in your page?

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Angel" <as****@hotmail.com> wrote in message
news:00****************************@phx.gbl...
When i try to run the web page that contains a custom web
user control '.ascx.' file i get the following error:

The type of page you have requested is not served because
it has been explicitly forbidden. The extension '.ascx'
may be incorrect.

What is wrong?

Thanks

Nov 18 '05 #3
I just dragged the user control onto my aspx page. I also
tried 'View in Browser' the .ascx file and got the same
error. I am wondering if its a configuration error on my
IIS. That it is a file restricted from being served.

Thanks for the quick response
-----Original Message-----
Ascx controls aren't meant to be served, as the message indicates, they aremeant to be consumed by aspx pages. How are you including this in your page?
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Angel" <as****@hotmail.com> wrote in message
news:00****************************@phx.gbl...
When i try to run the web page that contains a custom web user control '.ascx.' file i get the following error:

The type of page you have requested is not served because it has been explicitly forbidden. The extension '.ascx'
may be incorrect.

What is wrong?

Thanks

.

Nov 18 '05 #4
I would...

Start a new project
create a webform
create a usercontrol with simple text/html
save them
drop the user control on the webform
make the webform "Set as start page"
run the project and see if you get the same error

--
Jerry Boone
Analytical Technologies, Inc.
http://www.antech.biz
Secure Hosting and Development Solutions for ASP, ASP.NET, SQL Server, and
Access

"Angel" <as****@hotmail.com> wrote in message
news:00****************************@phx.gbl...
I just dragged the user control onto my aspx page. I also
tried 'View in Browser' the .ascx file and got the same
error. I am wondering if its a configuration error on my
IIS. That it is a file restricted from being served.

Thanks for the quick response
-----Original Message-----
Ascx controls aren't meant to be served, as the message

indicates, they are
meant to be consumed by aspx pages. How are you

including this in your page?

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Angel" <as****@hotmail.com> wrote in message
news:00****************************@phx.gbl...
When i try to run the web page that contains a custom web user control '.ascx.' file i get the following error:

The type of page you have requested is not served because it has been explicitly forbidden. The extension '.ascx'
may be incorrect.

What is wrong?

Thanks

.

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
4
by: louise raisbeck | last post by:
Resending this as own topic as didnt get answer from original. Would be grateful for a response from anyone that knows. Thanks. Hi there, I found your post really helpful..but i wondered if, once...
0
by: tony | last post by:
Hello! This is a rather long mail but it's a very interesting one. I hope you read it. I have tried several times to get an answer to this mail but I have not get any answer saying something...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
0
by: davidr | last post by:
Hi, I have a panel that I load user Control in no problem. The problem arrises when I do a post back on one of these user controls. I have button it does a click event. In this click event I...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
3
by: Fred Chateau | last post by:
I am trying to access a user control class, for a user control that is loaded dynamically, from the containing page. I have been able to access Web controls in the user control, but so far I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.