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?
public class LOMDLL.Main_Lom_Form PopulateMainForm()