Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - [ASP.NET 2.0] ChangePassword class conflicting with my page

 
Thread Tools Search this Thread
Old 04-15-2006, 02:03 AM   #1
Default [ASP.NET 2.0] ChangePassword class conflicting with my page


Hello!

I have a web page named "ChangePassword.aspx", which works just wonderful on
my developer machine. When I deploy it to the server, though, I get:

Compiler Error Message: CS0030: Cannot convert type
'ASP.changepassword_aspx' to 'System.Web.UI.WebControls.ChangePassword'

public changepassword_aspx() {
Line 121: string[] dependencies;
Line 122: ((ChangePassword)(this)).AppRelativeVirtualPath =
"~/ChangePassword.aspx";
Line 123: if ((global::ASP.changepassword_aspx.@__initialized ==
false)) {
Line 124: global::ASP.changepassword_aspx.@__stringResource =
this.ReadStringResource();

I don't like to be negative, but come on! The same thing happened in
ASP.NET 1.0, so I thought you guys would have figured out how to enforce
namespaces on compiled pages. In ASP.NET 1.0, you can get similar conflicts
with web controls that share the same name but are in different namespaces...

How do I get around this without having to change the name of the page???

Thanks

--
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.accessquery.com
---
If you think it''s expensive to hire a professional to do the job, wait
until you hire an amateur.



=?Utf-8?B?amF2YXRvcGlh?=
  Reply With Quote
Old 04-17-2006, 05:14 PM   #2
=?Utf-8?B?amF2YXRvcGlh?=
 
Posts: n/a
Default RE: [ASP.NET 2.0] ChangePassword class conflicting with my page
The obscure control reference in ASP 1 is the following:

1. Start an ASP.NET project
2. Create two folders: Controls1 and Controls2
3. Create a control named "MyControl" in Controls1
-> webproject/Controls1/MyControl.ascx
4. Create a control named "MyControl" in Controls2
-> webproject/Controls2/MyControl.ascx
5. Create your Default.aspx page and put both controls in it.
6. Build and deploy to your server (this will work on your dev box)
7. Open your test page on your server.

At this point you should have a compiler error on the server that will make
no sense to you. After you turn on the detailed errors, you will see that
your "MyControl" class is already defined - even through you know that it is
not because they are in separate namespaces.

Apparently the ASP.NET compiler does not assign namespaces to the generated
classes that would match their folder hierarchy. Zorch! You can only get
around this by using the "className" attribute in the control's declaration.

Is the same bug in ASP.NET 2.0??
--
Jacob W Anderson
---
http://www.beyond-ordinary.com
http://www.accessquery.com
---
If you think it''s expensive to hire a professional to do the job, wait
until you hire an amateur.



"javatopia" wrote:

> Hello!
>
> I have a web page named "ChangePassword.aspx", which works just wonderful on
> my developer machine. When I deploy it to the server, though, I get:
>
> Compiler Error Message: CS0030: Cannot convert type
> 'ASP.changepassword_aspx' to 'System.Web.UI.WebControls.ChangePassword'
>
> public changepassword_aspx() {
> Line 121: string[] dependencies;
> Line 122: ((ChangePassword)(this)).AppRelativeVirtualPath =
> "~/ChangePassword.aspx";
> Line 123: if ((global::ASP.changepassword_aspx.@__initialized ==
> false)) {
> Line 124: global::ASP.changepassword_aspx.@__stringResource =
> this.ReadStringResource();
>
> I don't like to be negative, but come on! The same thing happened in
> ASP.NET 1.0, so I thought you guys would have figured out how to enforce
> namespaces on compiled pages. In ASP.NET 1.0, you can get similar conflicts
> with web controls that share the same name but are in different namespaces...
>
> How do I get around this without having to change the name of the page???
>
> Thanks
>
> --
> Jacob W Anderson
> ---
> http://www.beyond-ordinary.com
> http://www.accessquery.com
> ---
> If you think it''s expensive to hire a professional to do the job, wait
> until you hire an amateur.
>



=?Utf-8?B?amF2YXRvcGlh?=
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
.aspx page apears minimized when pops up sam.dev Software 3 02-04-2008 03:04 PM
master page & app_theme folder doesn't work dummies2 General Help Related Topics 0 09-04-2007 05:41 PM
Clear the Session value on page unload tessythampan Software 1 08-12-2006 12:18 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46