asp.net - Simple ASPX cannot bind to vb.net codebehind -


i have aspx page in vs 2013 solution:

<%@ page language="vb" autoeventwireup="false" codebehind="default.aspx.vb" inherits="paypaltester._default" %>  <!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 id="head1" runat="server">     <title>source page</title> </head> <body>     <form id="form1" runat="server">      </form> </body> </html> 

and codebehind:

namespace paypaltester     partial public class _default         inherits system.web.ui.page          protected sub btnrun_click(sender object, e eventargs)          end sub      end class end namespace 

when try compile error could not load type 'paypaltester._default'.

if remove inherits="paypaltester._default" don't error anymore, new error 'btnrun_click' not member of 'asp.default_aspx'.

these such simple pages...i use c#, have use vb.net this. doing wrong?

your project setup web site project, page configured web application project. change page declaration @ top of markup from:

<%@ page language="vb" autoeventwireup="false"      codebehind="default.aspx.vb" inherits="paypaltester._default" %> 

to:

<%@ page language="vb" autoeventwireup="false"      codefile="default.aspx.vb" inherits="paypaltester._default" %> 

this msdn link compares two.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -