You are mistaken in your analysius of what is happening. The value is
written to the page, but not instead of the assignment. Both are taking
place.
You are putting the vendor id in the session variable, then you write
the value of the statement to the page. The value of an assignment
statement is the value that is assigned.
What your code is doing is similar to:
<% Response.Write( Session("oID") = Container.DataItem("VendorID") ); %>
You can put the assignment in a tag that doesn't produce any output:
<% Session("oID") = Container.DataItem("VendorID"); %>
Or even better, put the statement in the code behind of the page
instead. There is really no reason to have the statement in the page, as
it doesn't produce any output.
Dom wrote:
<%# Session("oID") = Container.DataItem("VendorID")%>
The above statment, writes the value of the 'VendorID' instead of assigning
it to the session variable.
What's wrong? I'm a classic ASP developer and have been asked to help with a
quick fix for a .net site. Tried googling for help but found nothing useful.
Thanks