Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:48:53+00:00 2026-06-07T05:48:53+00:00

I have a page that is exhibiting the strangest behavior. When building/debugging my project

  • 0

I have a page that is exhibiting the strangest behavior. When building/debugging my project I will sometimes receive build errors pointing to my page directive.

If I insert an additional space between any two attributes in the directive, the error goes away and the build succeeds.

Page Directive:

<%@ Page Language="C#" AutoEventWireup="true" EnableSessionState="true" CodeBehind="myPage.aspx.cs" Inherits="com.mycompany.UserControls.myPage" %>

Resulting Errors:

Keyword, identifier, or string expected after verbatim specifier: @ C:\mypath\myPage.aspx   1   1   myProjectName

A namespace cannot directly contain members such as fields or methods   C:\mypath\myPage.aspx   1   1   myProjectName

To reiterate, for example, adding an additional space between Page and Language="C#" temporarily clears the errors. I will see a 100% success rate on the next build, but the error will eventually reappear. I can often force the error by closing the editor that is showing the myPage.aspx and building/rebuilding my project.

Note: This behavior was present in Visual Studio 2008, and still remains after a switch to Visual Studio 2010.

Edit: Corrected typo where @ was omitted from page directive in question.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:48:54+00:00Added an answer on June 7, 2026 at 5:48 am

    Are you missing the @ symbol between the opening <% and the Page keyword?
    You have

    <% Page Language="C#" AutoEventWireup="true" EnableSessionState="true" CodeBehind="myPage.aspx.cs" Inherits="com.mycompany.UserControls.myPage" %>
    

    and it should be

    <%@ Page Language="C#" AutoEventWireup="true" EnableSessionState="true" CodeBehind="myPage.aspx.cs" Inherits="com.mycompany.UserControls.myPage" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one page that generates png images on the fly,project is not over
I have a page that will display one of two options for a Struts2
I have page that POSTS AJAX to the server, and often the data will
I have a page that will need to generate thumbnail images for each article.
I have page process that I am trying to run that will send an
I have a page that features a main image. The main image will change
I have a page that builds out a table. Nothing else on that page
I have a page that lets the user edit the content of the page
I have a page that uses the Telerik RadListView control and a Telerik RadDataPager
I have a page that I want to update non stop, every few seconds.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.