views:

883

answers:

1

Hi, When I'm trying to call an ascx with Jquery post I get: "This type of page is not served" I think it's something to do with the IIS not allowing calls directly to ascx. Is it possible to allow posting to ascx? I have IIS6. Thanks.

+3  A: 

No, .ascx is a control, it is included and rendered in .aspx pages.

So the error is correct, ascx should not be served.

Wrap it in an aspx page like so:

<%@ Page %>
<%@ Register TagPrefix="scott" TagName="header" Src="Controls/Header.ascx" %>
<scott:Header runat=server id="control1" />
Chad Grant
Do you mean create an aspx file and put the ascx in it?
SirMoreno
yes .
Chad Grant