asp.net - Error in aspx page when “src” is used -


i have asp.net project in visual studio 2005. has subfolder called aspx inside there many aspx pages. existing project , when run website, following error –

compiler error message: bc30456: 'initializeculture' not member of 'asp.aspx_anetnews_aspx'.

line 1: <%@ page language="vb" autoeventwireup="false" src="anetnews.aspx.vb" codebehind="anetnews.aspx.vb" inherits="mynamespace.anetnews" %>

when remove src="anetnews.aspx.vb" part, working fine. scenario page (almost 100 pages) in website. guess setting issue in project properties. guess setting issue?

note: guess project migrated vs2005 .net 1.0, without code/solution change.

note: downloaded source code vss , set in machine.

note: have referred aspx page doesn't compile when page copied project. if conver project web application, issue goes away. not allowd make change. there other setting missing

references:

  1. social.msdn - bc30456: 'initializeculture' not member of ....
  2. aspx page doesn't compile when page copied project

you failed mention previous version of visual studio, never mind. src attribute deprecated beyond .net 2.0, , recommended approach use inherits/codefile instead. don't know why you're getting runtime error, solution remove src attribute each page.

http://msdn.microsoft.com/en-us/library/vstudio/ydy4x04a(v=vs.100).aspx

src

specifies path source file containing code linked page. in linked source file, can choose include programming logic page either in class or in code declaration blocks.

you can use src attribute link build providers page. more information, see buildprovider class. also, in versions of asp.net prior 2.0, src attribute used alternative way link code-behind file page. in asp.net 2.0, preferred approach linking code-behind source file page use inherits attribute specify class, along codefile attribute specify path source file class.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -