By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Why I'm getting this error?

P: n/a
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.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

Mar 2 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Mar 2, 8:07 pm, "Ignacio Machin \( .NET/ C# MVP \)" <ignacio.machin
AT dot.state.fl.uswrote:
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.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

what is dataSetRG? I assume a static object?

Mar 2 '07 #2

P: n/a
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
--
Milosz
"Milosz Skalecki [MCAD]" wrote:
Is it a joke you have C# MVP?
--
Milosz
"Ignacio Machin ( .NET/ C# MVP )" wrote:
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.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro


Mar 2 '07 #3

P: n/a
Is it a joke you have C# MVP?
--
Milosz
"Ignacio Machin ( .NET/ C# MVP )" wrote:
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.To String();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

Mar 2 '07 #4

P: n/a
On Fri, 2 Mar 2007 14:07:44 -0500, "Ignacio Machin \( .NET/ C# MVP \)"
<ignacio.machin AT dot.state.fl.uswrote:
>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?
>myNewSOsRow=this.dataSetRG.SOs.NewSOsRow;

myNewSOsRow.SOCustomer=this.txtBoxCustomer.Text.T oString();

dataSetRG.SOs.AddSOsRow(myNewSOsRow);

this.dataGridSummary.DataBind();

}

Thanks, Alejandro

Mar 3 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.