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

  • Home
  • SEARCH
  • 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 1898210
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:44:17+00:00 2026-05-17T06:44:17+00:00

My current Web Site does not have any designer.cs files. (Yes it is not

  • 0

My current Web Site does not have any designer.cs files. (Yes it is not a Web Application)

The site is complete but now I added 2 Clases to my site and all good but when I want to make use of my GridView it tells me this:

alt text

This is because I wrapped my code with the same namespace as in my classes like so….

  namespace samrasWebPortalSQL
  {
     public partial class GridView : System.Web.UI.Page
   {
    protected void Page_Load(object sender, EventArgs e)
    {
        Functions.RemoveCaching(this);
        LoadGrid();

    }

    private void LoadGrid()
    {
        DataSet dataSet = SQLHelper.GetDataSet("select * from company");
        Functions.BindGridView(GridView1, dataSet);
    }

   }
}

I know I need the following code in my .designer.cs file but since I dont have one cant I place it anywhere ells?

protected global::System.Web.UI.WebControls.GridView GridView1;
  • 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-05-17T06:44:17+00:00Added an answer on May 17, 2026 at 6:44 am

    In your “web site”, you can add a new ASPX page (Web Form). And in that web form you can drag a GridView onto that page. Once you’ve given it an ID like this:

    <div>
    <asp:gridview ID="Grid1" runat="server"></asp:gridview>
    </div>
    

    You can then go to the code behind and do something like this:

    protected void Page_Load(object sender, EventArgs e)
    {
        Grid1.DataSource =..;
    }
    

    If you put your code behind in a different class name or namespace, then you need to tell your web form where to find it. You do this by chaning the Inherits property of the page directive like this:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="samrasWebPortalSQL.GridView" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an asp.net Web Application (Not Web Site) that I am trying
I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
I have a web application that uses the current version of JQuery that needs
What is a good site to check current web usage statistics -- particularly Java
Here is my issue. I have an ASPX web site and I have code
I have a web application with a TreeView/TreeNode I want it so when I
We are looking for a reliable current weather web service for Europe, with city
I need to integrate a email client in my current python web app. Anything
I'm trying to work out a way of passing the web current http context
My current position is this: if I thoroughly test my ASP.NET applications using web

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.