Add attribute - apparently I have to

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Haydnw (haydnw_at_removeyahooremove.com)
Date: 08/08/04


Date: Sun, 8 Aug 2004 21:01:26 +0100

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



Relevant Pages

  • Re: Add attribute - apparently I have to
    ... "Haydnw" wrote in message ... > I have the following line of code in a code-behind file. ... > Am I not assigning to the property with the line I'm using??? ... Simplify the situation by replacing the attribute value with "x" and see ...
    (microsoft.public.dotnet.framework.aspnet)
  • Inserting rows syntax + row #ing code in protected sheet?
    ... The syntax to put basically at beginning and end of a macro that's assigned ... didn't realize that the insert function is gone once a sheet is protected ... then assigning a message box macro to it to say "unprotect the sheet to ... insert rows, then protect again" if worse came to worst, but I feel that ...
    (microsoft.public.excel.programming)
  • Re: Getting value from asp:label into javascript input value
    ... In regular asp the syntax for assigning an asp global variable to a ... javascript var is: ... Prev by Date: ...
    (comp.lang.javascript)
  • Re: Help with syntax warnings
    ... Python detects "dubious syntax"? ... And here I thought programming ... > (He notes examples such as assigning to None and "unqualified exec is ...
    (comp.lang.python)
  • Select Count question
    ... What is the syntax for assigning the returned value ... where callhold is the sql statement and counted is the variable I want the ...
    (microsoft.public.vb.database.ado)