Why I'm getting this error?

  • Thread starter Ignacio Machin \( .NET/ C# MVP \)
  • Start date
I

Ignacio Machin \( .NET/ C# MVP \)

I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:


private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;

myNewSOsRow=new dataSetRG.SOs.NewSOsRow();

myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.ToString();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}



Thanks, Alejandro
 
G

Guest

I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:

private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;

myNewSOsRow=new dataSetRG.SOs.NewSOsRow();

myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.ToString();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro


what is dataSetRG? I assume a static object?
 
G

Guest

Hi again,

i didn't see you used someone else's (a MVP's) account ;-)

I don't know what type dataSetRG:

PutTheTypeOfdataSetRG.SOsRow myNewSOsRow = this.dataSetRG.SOs.NewSOsRow;
myNewSOsRow.SOCustomer = this.txtBoxCustomer.Text.ToString();
dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataSource = dataSetRG;
this.dataGridSummary.DataBind();

hope this helps
 
R

Registered User

I'm getting an error "c:\inetpub\wwwroot\RGSSO\SO.aspx.cs(363):
'RGSSO.WebForm1.dataSetRG' denotes a 'field' where a 'class' was expected"
on the following code:


private void btnAdd_Click(object sender, System.EventArgs e)

{

dataSetRG.SOsRow myNewSOsRow;
Here an assignment is made using a c'tor. The relationship between the
types
dataSetRG.SOsRow
dataSetRG.SOs.NewSOsRow
is unclear.
myNewSOsRow=new dataSetRG.SOs.NewSOsRow();
Here a second assignment is made to the same variable. Does the this
pointer have a member named dataSetRG that is of type dataSetRG?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top