Solved

ASP.NET Code Behind doesn't work

Posted on 2008-10-30
3
209 Views
Last Modified: 2013-11-07
Hi,

I have created a Webform in VS 2005 using VB ASP.NET and using a seperate code behind file and have placed these files in a folder under the root directory that I have created called "user".

However, none of the Code Behind functionality works including Page_Load.  If I move these files into the root directory it works OK. The only method I have found is to move of the Behind Code onto the Webform itself between a couple of <script runat=server> tags.

How can I get the webform in the folder to work so the functionality works like it does when in the root directory.
0
Comment
Question by:micr0Sc0pe
  • 2
3 Comments
 
LVL 13

Expert Comment

by:sm394
ID: 22846248
check on top of your aspx file for codefile and inherits
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
0
 

Author Comment

by:micr0Sc0pe
ID: 22846341
This line was automatically created when I setup the page.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Users.aspx.vb" Inherits="usr_Users" %>

Open in new window

0
 
LVL 13

Accepted Solution

by:
sm394 earned 125 total points
ID: 22846368
in that case i can only say try
AutoEventWireup="true"
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question