Ask a Question related to Dreamweaver AppDev, Design and Development.
-
garysf #1
Reference a variable in a repeater
I have some code that worked fine until a created a repeater. I get an error
(BC30451) that I've researched on Google groups, etc., to no avail.
Here's the code:
<ASP:Repeater runat="server" DataSource='<%# dsUsers.DefaultView %>'>
<ItemTemplate>
<select name="select" style="font-size: 10px"
onChange="document.forms[0].submit()">
<% If userVar = dsUsers.FieldValue("logonID", Container) Then %>
<option value = <%= dsUsers.FieldValue("logonID",Container)%> selected><%=
dsUsers.FieldValue("logonID",Container)%>
</option>
<% Else %>
<option value = <%= dsUsers.FieldValue("logonID",Container)%>><%=
dsUsers.FieldValue("logonID",Container)%></option>
<% End If %>
<%
Next
%>
</select>
</ItemTemplate>
</ASP:Repeater>
Here's the error message: BC30451: Name 'userVar' is not declared
I declared userVar at the top of the file and gave it a value. How do I fix?
Thanks!
garysf Guest
-
Help with variable reference in perl OOD
I need to be able to set a variable equal to the value of an OOD reference such that when the reference changes, the the variable changes as well... -
passing global variable by reference?
I'm trying to stick my frequently used subroutines into a Sysadmin.pm module. Of course the first one I tried uses global variables and I wondering... -
[PHP-DEV] Bug #24687 - can't return non-variable by reference
Is this still open because it's possible that it might somehow be "fixed"? (though as comments note, it doesn't make any sense, and in any case, in... -
Reference a VBScript Variable in ASP
This is my VBScript function: <script language="JavaScript" type="text/JavaScript"> Dim UN Set objNet = CreateObject("WScript.NetWork") Set... -
Variable reference
Par <paer_nystroem@hotmail.com> wrote: $var{ $part1 . $part2 } or $var{ "$part1$part2" } -- -
RichMcCrea #2
Re: Reference a variable in a repeater
your if statement appears to be missing an opening parenthesis <% If userVar =
dsUsers.FieldValue('logonID', Container) Then %> should be <% If (userVar =
dsUsers.FieldValue('logonID', Container) Then %> just and eyeball code check..
but try that. If that doesn't fix it, you may want to show us how you
declared your variable. Rm
RichMcCrea Guest



Reply With Quote

