Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Trying to assign result of query to a variable
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Trying to assign result of query to a variable

 Post Reply Post Reply
Author
alistairhay View Drop Down
Newbie
Newbie
Avatar

Joined: 29 October 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alistairhay Quote  Post ReplyReply Direct Link To This Post Topic: Trying to assign result of query to a variable
    Posted: 29 October 2007 at 9:18pm
 know this sounds very basic, but it doesn't work the way I am used to coding web pages. First time I am using expression web.

I was to assign the result of a query to a variable so I can test the result, and if true, display something, if false, not display anything.

Query is this :

<asp:AccessDataSource runat="server" ID="VenueLookup" DataFile="App_Data/PublicHousePromotions.mdb"
SelectCommand="SELECT * FROM [Venue] WHERE ([venueCode] = ?)">
<SelectParameters>
<asp:querystringparameter Type="Int32" DefaultValue="1" Name="venueCode" QueryStringField="MyRef" />
</SelectParameters>
</asp:AccessDataSource>


What I am trying to do is this :

<script>
<%
Dim JoinedDate as String
JoinedDate = [venueDateSignedAgt]
if JoinedDate <> "" then
%>
<span class="style32">Joined:</span><asp:Label Text='<%# Bind("[venueDateSignedAgt]","{0:d}") %>' runat="server" id="lblJoined" Font-Names="Comic Sans MS" />
<br/>
<% end if %>
</script>


Any help would be hugely appreciated.
Back to Top
jamie.townsend View Drop Down
Groupie
Groupie


Joined: 07 December 2007
Location: England
Status: Offline
Points: 114
Post Options Post Options   Thanks (0) Thanks(0)   Quote jamie.townsend Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2007 at 8:17pm
For starters the script does not have runat="server"
Did you get this working in the end ?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.