Why does the second line work but not the first one?
I get the “The server tag is not well formed”.
And the Guid I’ve copy into the second line is directly from the database.
< asp:Image runat="server" ImageUrl="~/Images/Avatar/Avatar.aspx?UserId=<%#DataBinder.Eval(Container.DataItem, "UserId")%>" />
< asp:Image runat="server" ImageUrl="~/Images/Avatar/Avatar.aspx?UserId=22AA736E-BD1B-4623-8E76-4769051F2E60" />
Or try
Your problem was the double quotes. Your opening quote was a double quote so was being closed by the opening quote on “UserID”.
You should also always use single quotes when databinding anyway.