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.
Asp.net jquery发布ascx:这种类型的页面不是
原标题:
最佳回答
不是,.ascx是一个控件,它被包含并渲染在.aspx页面中。
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" />
问题回答
Just FYI, in an MVC application, you are actually allowed to load an .ascx by pointing the URL to an Action that returns a PartialView.
相关问题
热门标签
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding