Add attribute - apparently I have to
From: Haydnw (haydnw_at_removeyahooremove.com)
Date: 08/08/04
- Next message: Francois Soucy: "Re: 2 projects in same webroot"
- Previous message: John Saunders: "Re: Cannot assign property of a WebControl"
- Next in thread: John Saunders: "Re: Add attribute - apparently I have to"
- Reply: John Saunders: "Re: Add attribute - apparently I have to"
- Reply: Steve Willcock: "Re: Add attribute - apparently I have to"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Francois Soucy: "Re: 2 projects in same webroot"
- Previous message: John Saunders: "Re: Cannot assign property of a WebControl"
- Next in thread: John Saunders: "Re: Add attribute - apparently I have to"
- Reply: John Saunders: "Re: Add attribute - apparently I have to"
- Reply: Steve Willcock: "Re: Add attribute - apparently I have to"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|