Forums

ASP

This topic is locked

ASP .NET frustrating question

Posted 18 Jul 2003 00:07:33
1
has voted
18 Jul 2003 00:07:33 Dennis Franczak posted:
I am DESPERATELY trying to assign a variable a dynamic value from a database record. I have pulled the record using a binding called CompanyList (it pulls company data) from a table called Company. The code to show this result is this:
<%# CompanyList.FieldValue("company_industry", Container%> (the value by the way is Banking)

I want to take that value and assign it to a variable, called test, so I set my code to this:

dim test As string
test = <%# CompanyList.FieldValue("company_industry", Container)%>

the error I get is: Compiler Error Message: BC30201: Expression expected.


essentially, I want test="Banking" where banking is the value from the column Industry in the table Company

Replies

Replied 18 Jul 2003 09:46:36
18 Jul 2003 09:46:36 Rik Eshuis replied:
Try removing the <%# and %> tags from your example. These are not needed when assigning variables.

---------------------------------------
Rik Eshuis

---------------------------------------

Reply to this topic