H
Haydnw
I have the following line of code in a code-behind file. It's part of a
event which is run when a user clicks an asp:imagebutton on a page.
tblMainImage.Rows[0].Cells[0].Attributes.Add("background",
"../images/albums/" & Request.QueryString("d") & "/" &
RowView("strFilename") & ".jpg")
However, when I view the page I get an error message with this line
highlighted, saying:
'Property access must assign to the property or use its value.'
Am I not assigning to the property with the line I'm using??? I'm adding the
attribute so surely I'm assigning to it? I've looked at lots of past posts
and they all seem to indicate using the syntax above. So where am I going
wrong?! Thanks in advance to anyone who can point me in the right direction.
Haydn
event which is run when a user clicks an asp:imagebutton on a page.
tblMainImage.Rows[0].Cells[0].Attributes.Add("background",
"../images/albums/" & Request.QueryString("d") & "/" &
RowView("strFilename") & ".jpg")
However, when I view the page I get an error message with this line
highlighted, saying:
'Property access must assign to the property or use its value.'
Am I not assigning to the property with the line I'm using??? I'm adding the
attribute so surely I'm assigning to it? I've looked at lots of past posts
and they all seem to indicate using the syntax above. So where am I going
wrong?! Thanks in advance to anyone who can point me in the right direction.
Haydn