Solved

ASP.NET Code Behind doesn't work

Posted on 2008-10-30
3
200 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now