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 6560983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:31:52+00:00 2026-05-25T13:31:52+00:00

i have two separate questions; however, since they are very similar i will ask

  • 0

i have two separate questions; however, since they are very similar i will ask them in one posting.

what is the reason i cannot reference the textboxes from here? i created another file in my project and put

namespace EnterData.DataEntry
{
    public partial class WebForm1 : System.Web.UI.Page
    { 

to make it go into the same namespace and partial class as the webform. but i cannot access the textbox!

public partial class WebForm1 : System.Web.UI.Page
    {

public class LOMDLL.Main_Lom_Form PopulateMainForm()
        {
            //populate class
            LOMDLL.Main_Lom_Form TheForm = new LOMDLL.Main_Lom_Form();

            try
            {
                TheForm.lom_number = lom_numberTextBox.Text.ToInt();
                TheForm.identified_by = identified_byTextBox.Text;
                TheForm.occurrence_date = occurrence_dateTextBox.Text.ToDateTime();
                //TheForm.pre_contact = pre_contactTextBox.Text; //need to create this texdtbox
                //TheForm.pre_practice_code = pre_practice_codeTextBox.Text; //create this
                TheForm.report_by = report_byTextBox.Text;
                TheForm.report_date = report_dateTextBox.Text.ToDateTime();
                TheForm.section_c_comments = section_c_commentsTextBox.Text;
                TheForm.section_c_issue_error_identified_by = section_c_issue_error_identified_byTextBox.Text;
                TheForm.section_d_investigation = section_d_investigationTextBox.Text;
                TheForm.section_e_corrective_action = section_e_corrective_actionTextBox.Text;
                TheForm.section_f_comments = section_f_commentsTextBox.Text;
            }
            catch (Exception e)
            {

            }

i get this error:

Error 20 Cannot access a non-static member of outer type 'EnterData.DataEntry.WebForm1' via nested type 'EnterData.DataEntry.WebForm1.LOMDLL' C:\Documents and Settings\agordon\My Documents\Visual Studio 2008\Projects\lomdb\EnterData\DataEntry\DAL.cs 68 38 EnterData

on all textboxes

what is the reason that i cannot access the textboxes from here?

  • 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-25T13:31:53+00:00Added an answer on May 25, 2026 at 1:31 pm

    Did you mean to nest classes here? If you intended to declare a method that returns a Main_Lom_Form(), try this:

    public LOMDLL.Main_Lom_Form PopulateMainForm()
    

    If you intended to call that method against a member of WebForm1 called TheForm, then instantiate that outside of the call to PopulateMainForm:

    LOMDLL.Main_Lom_Form TheForm = new LOMDLL.Main_Lom_Form();
    public void PopulateMainForm()
    {
        // snip
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two separate caches running in a JVM (one controlled by a third
We have two databases, in two separate locations. One of the databases resides in
We have two separate web-apps, say 'retailUI' and 'bulkUI'. These two are basically two
I have two separate applications (both part of the same system) that share a
I have two separate sets of tables in the same database that model the
Say I have two separate classes, A and B. I also have Repository class
I have a Cake website and it needs to have two separate logins, each
Is it possible to combine Underscore's filter and map? I currently have two separate
I have two essentially separate applications for configuring two pieces of hardware sold by
I have two physically-separate MySQL databases on which I have to run a single

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.