asp.net - How to remove namespace from Inherits Attribute without a Parser Error, Could not load type -


i've seen lots of posts inherits attribute, , parser error "could not load type"

i can working putting "rootnamespace.pagename" specific page, rootnamespace matches root namespace in project properites.

but rather not put namespace in there. i.e. rather put "pagename" "namespace.pagename".

i have library project few dlls , 10 or .aspx , .ascx files. update of library project, other projects in company copy dlls in , copy .aspx , .ascx files specific folder in project.

only problem every time copy have change namespace of inherits attribute match root namesapce in project. if don't this, no compiler errors parser error when hit libary .aspx , .ascx files.

this annoying, seems ridiculous many pages not work if project root namespace changes.

does have ideas on how can make library pages , user controls nuse withing other peoples projects?

thanks, mike g

ah ha! colleague stumbled upon way around accident...

ok have single shared "library" project , many "normal" projects make use of shared stuff library...

1- create "library" webapplication outputs dll, , put web library code , .ascxs , .aspx pages webapplication project. 2- reference "library" dll in "normal" projects 3- copy shared .aspx , .ascx files "library" "normal" projects, ... (important bit!) ... without code behind

in our example don't include copied .ascx , .aspx files in project (e.g. they're not referenced in .vbproj file) , don't put in source control, copied in library every time build. haven't experimented happens if tell project .aspx , .ascx files load ok @ run time.

so make sense no think ab out it. root namespace of .aspx files unachanged it's refers classes in referenced library dll works.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -