Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > [ASP.NET 2.0] ChangePassword class conflicting with my page

Reply
Thread Tools

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

 
 
=?Utf-8?B?amF2YXRvcGlh?=
Guest
Posts: n/a
 
      04-15-2006
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.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?amF2YXRvcGlh?=
Guest
Posts: n/a
 
      04-17-2006
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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
changepassword control problems davidr@sharpesoft.com ASP .Net 0 07-17-2006 08:30 PM
asp:ChangePassword question =?Utf-8?B?bmljaw==?= ASP .Net 1 07-02-2006 02:33 PM
ChangePassword schlack ASP .Net 1 05-15-2006 01:29 AM
Redirect to ChangePassword screen after logon. chris@chrisbreier.com ASP .Net 1 05-06-2006 07:32 PM
Question about ChangePassword control Evgeny ASP .Net 2 01-28-2006 04:55 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57