i am a newbie. can anyone tell me how to create a codebehind file? I uploaded the classified site to my hosting company. www.1and1.com and couldn't get it to work. i called the help desk and was told i need to create a codebehind file. i am using VS
2005. Please help
The starter kit is written with inline coding, as opposed to a code behind approach. The end result is the same working code, just different ways of separating presentation from logic. They both work the same as far as the server is concerned, so not having
a code behind file is not your issue.
If you tell us what "couldn't get it to work" really means, with error messages, expected results and so on, we can help. My guess is you need to configure the database, but just because that's a common beginning issue.
Most likely either you have not configured the /myown folder as an application, or you have a second web.config file, most likely one in the root and the correct one in the /myown folder. If two web.config fils, rename the one in the root and test. If
not, check with your host about how to configure your folder as an application.
I only had one web.config file. So I made the myown folder an application folder as you suggested. Now I am getting this error -
Compiler Error Message: CS0138: A using namespace directive can only be applied to namespaces; 'System.Data.SqlClient.SqlConnection' is a type not a namespace
lwarner4q
0 Points
16 Posts
CodeBehind
Dec 28, 2006 04:23 AM|LINK
Hi
i am a newbie. can anyone tell me how to create a codebehind file? I uploaded the classified site to my hosting company. www.1and1.com and couldn't get it to work. i called the help desk and was told i need to create a codebehind file. i am using VS 2005. Please help
Thanks
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: CodeBehind
Dec 28, 2006 04:07 PM|LINK
The starter kit is written with inline coding, as opposed to a code behind approach. The end result is the same working code, just different ways of separating presentation from logic. They both work the same as far as the server is concerned, so not having a code behind file is not your issue.
If you tell us what "couldn't get it to work" really means, with error messages, expected results and so on, we can help. My guess is you need to configure the database, but just because that's a common beginning issue.
Jeff
lwarner4q
0 Points
16 Posts
Re: CodeBehind
Dec 28, 2006 05:04 PM|LINK
Jeff
Thanks for responding - the URL is http://www.scorpaknox.com/myown/default.aspx
Hopefully you can see the error…
Thanks
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: CodeBehind
Dec 28, 2006 10:16 PM|LINK
Most likely either you have not configured the /myown folder as an application, or you have a second web.config file, most likely one in the root and the correct one in the /myown folder. If two web.config fils, rename the one in the root and test. If not, check with your host about how to configure your folder as an application.
Jeff
lwarner4q
0 Points
16 Posts
Re: CodeBehind
Dec 28, 2006 11:32 PM|LINK
Jeff
I only had one web.config file. So I made the myown folder an application folder as you suggested. Now I am getting this error -
Compiler Error Message: CS0138: A using namespace directive can only be applied to namespaces; 'System.Data.SqlClient.SqlConnection' is a type not a namespace
Thanks
classified starter kit implementation
jeff@zina.co...
All-Star
87677 Points
11637 Posts
Moderator
Re: CodeBehind
Dec 29, 2006 02:48 AM|LINK
Is your application set to ASP.NET 2.0? Sounds like it's using the 1.1 framework.
Jeff
lwarner4q
0 Points
16 Posts
Re: CodeBehind
Dec 29, 2006 12:17 PM|LINK
Jeff
Forgive me but where do you check to make sure it is .net 2.0?
Thanks
lwarner4q
0 Points
16 Posts
Re: CodeBehind
Dec 29, 2006 01:24 PM|LINK
Jeff
I found the settings and need to have my provider make some modifications on there side... will let you know how it goes....
thanks..
lwarner4q
0 Points
16 Posts
Re: CodeBehind
Dec 29, 2006 11:07 PM|LINK
Jeff
No luck still having the same error after i got my provider to make the changes.... any other idea on what this is?
Thanks
lwarner4q
0 Points
16 Posts
Re: CodeBehind
Dec 30, 2006 05:01 AM|LINK
Jeff
I think i am making some progress... I am getting this error now.. any thoughts?
Compiler Error Message: CS0246: The type or namespace name 'AspNet' could not be found (are you missing a using directive or an assembly reference?)
Source Error: