November 14th, 2002, 08:23 AM
Join Date: Nov 2002
Time spent in forums: < 1 sec
Reputation Power: 0
How to use Server.CreateObject in C#?
I'm having same problems converting the following VB.Net code to C#:
sub Page_Load ()
set au = server.createobject("Persits.AspUser")
str = au.getusername
Using vb.net, the code works great. I tried the following using C#:
public int Page_Load()
object au = server.createobject("Persits.AspUser");
userName = au.GetUserName();
When I use the C# version of this, I get the following error:
Compiler Error Message: CS0117: 'object' does not contain a definition for 'GetUserName'
Could you please show me how should I do. Please send some tutorial to me
I am forward to hearing from you.
please help me!
Thank you so much