473,396 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

<% if %> ... <% endif%>

Hi All,

I'm trying to use the <% if %> ... <% endif%> construct in the body of an
aspx page to conditionally display a table row. The table row is displaying
regardless of the condition result in the if construct. Am I doing something
wrong? The code is below:

<%if Test EQ 1%>
<TR>
<TD class="SubHead" noWrap width="1%">1Title:</TD>
<TD class="Normal" colSpan="6">
<asp:TextBox id="ftxtTitle" Width="100%" Runat="server">
</asp:TextBox>
</TD>
</TR>
<%endif%>

Thanks in advance to anyone who knows something about this.
Mark
Nov 19 '05 #1
1 2344
Is this a single row you are showing once in the table? Like a header or
footer? I highly recommend you replace the html with either an
asp:DataList, asp:Repeater, or asp:Table (there are other options, but these
would be the top 3 candidates in my opinion). Then, handle your logic
within your server-side code for the various properties of the control
(probably you'll want to play with the Visible and/or Enabled properties).

I've programmed in classic ASP for a long time, so I know how different it
is, but force yourself to get used to the new architecture and I promise, it
will get easier. Good luck.

"MarkN" <Ma***@discussions.microsoft.com> wrote in message
news:2D**********************************@microsof t.com...
Hi All,

I'm trying to use the <% if %> ... <% endif%> construct in the body of an
aspx page to conditionally display a table row. The table row is
displaying
regardless of the condition result in the if construct. Am I doing
something
wrong? The code is below:

<%if Test EQ 1%>
<TR>
<TD class="SubHead" noWrap width="1%">1Title:</TD>
<TD class="Normal" colSpan="6">
<asp:TextBox id="ftxtTitle" Width="100%" Runat="server">
</asp:TextBox>
</TD>
</TR>
<%endif%>

Thanks in advance to anyone who knows something about this.
Mark

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Angelos | last post by:
Hello again.... I am coding php in dreamweaver. And because I like to use it for the HTML parts I want my HTML code to be unquoted and not into echo statements. BUT I ended up in something like...
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
7
by: Anonymous | last post by:
I have a mixed-language pgm (Fortran and C++) which needs to pass a few hundred values from C++ to Fortran. One way to do this is to have a Fortran module and a C++ structure (or class) with an...
9
by: bill | last post by:
Forget the exact definition of difference between, #include <foo.h> and #include "bar.h" Normally foo.h is a standard header file, so it's path is not defined in compiler option, but I...
5
by: mailtogops | last post by:
Hi All, This is very basic C/C++ question but I need internals of C/C++ how the langauge/compiler do this.. Say I have two header files 1. header1.h 2. header2.h
9
by: Simple Simon | last post by:
Java longs are 8 bytes. I have a Java long that is coming in from the network, and that represents milliseconds since Epoch (Jan 1 1970 00:00:00). I'm having trouble understanding how to get it...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
7
by: huili80 | last post by:
Should complex<T>::real() and imag() return a value or a refernce? What does the standard say about this? I just realized that MSVC2008's implementation returns a value, but in GCC reference is...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.