473,473 Members | 2,309 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help Pls - declarative data binding

Hi,

I am trying to do something like this in html:

<% if(user.isBrowseActive()) { %><td nowrap="nowrap" class="browse"><a
href="swzBrowse">Browse</a></td><%}%>

except I want to replace the user.isBrowseActive() with a declarative
databinding statement like:

<%# myProperty %>

any ideas on how I can do this - been googling for a while with no luck.

thanks in advance!
Bill

Jan 27 '06 #1
4 1023
Check out this link":
http://openmymind.net/index.aspx?documentId=8#4

there are a couple ways to do it (inline or in codebehind).

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bill44077" <Bi*******@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
Hi,

I am trying to do something like this in html:

<% if(user.isBrowseActive()) { %><td nowrap="nowrap" class="browse"><a
href="swzBrowse">Browse</a></td><%}%>

except I want to replace the user.isBrowseActive() with a declarative
databinding statement like:

<%# myProperty %>

any ideas on how I can do this - been googling for a while with no luck.

thanks in advance!
Bill

Jan 27 '06 #2
Hi Karl,

Thanks for the quick reply, but I still can't quite figure out how to make
this work based on an "if" like:

<%# if(UserAdminFlag){ %> <li><a
href="Admin.aspx">Administration</a></li><%}; %>

that won't work because you need to have the property to bind immediately
following the <%# UserAdminFlag %>

I couldn't find any examples for what I am trying to do - maybe it can't be
done this way.

thanks!
Bill
"Karl Seguin [MVP]" wrote:
Check out this link":
http://openmymind.net/index.aspx?documentId=8#4

there are a couple ways to do it (inline or in codebehind).

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bill44077" <Bi*******@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
Hi,

I am trying to do something like this in html:

<% if(user.isBrowseActive()) { %><td nowrap="nowrap" class="browse"><a
href="swzBrowse">Browse</a></td><%}%>

except I want to replace the user.isBrowseActive() with a declarative
databinding statement like:

<%# myProperty %>

any ideas on how I can do this - been googling for a while with no luck.

thanks in advance!
Bill


Jan 27 '06 #3
why not just do:

<li runat="server" visible='<%# DataBinder.Eval(Container.DataItem,
"UserAdminFlag")'><a href=....>aa</a></li>

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bill44077" <Bi*******@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi Karl,

Thanks for the quick reply, but I still can't quite figure out how to make
this work based on an "if" like:

<%# if(UserAdminFlag){ %> <li><a
href="Admin.aspx">Administration</a></li><%}; %>

that won't work because you need to have the property to bind immediately
following the <%# UserAdminFlag %>

I couldn't find any examples for what I am trying to do - maybe it can't
be
done this way.

thanks!
Bill
"Karl Seguin [MVP]" wrote:
Check out this link":
http://openmymind.net/index.aspx?documentId=8#4

there are a couple ways to do it (inline or in codebehind).

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bill44077" <Bi*******@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
> Hi,
>
> I am trying to do something like this in html:
>
> <% if(user.isBrowseActive()) { %><td nowrap="nowrap" class="browse"><a
> href="swzBrowse">Browse</a></td><%}%>
>
> except I want to replace the user.isBrowseActive() with a declarative
> databinding statement like:
>
> <%# myProperty %>
>
> any ideas on how I can do this - been googling for a while with no
> luck.
>
> thanks in advance!
> Bill
>


Jan 27 '06 #4
Karl,

Thanks much! Perfect!

regards,
Bill
"Karl Seguin [MVP]" wrote:
why not just do:

<li runat="server" visible='<%# DataBinder.Eval(Container.DataItem,
"UserAdminFlag")'><a href=....>aa</a></li>

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bill44077" <Bi*******@discussions.microsoft.com> wrote in message
news:5B**********************************@microsof t.com...
Hi Karl,

Thanks for the quick reply, but I still can't quite figure out how to make
this work based on an "if" like:

<%# if(UserAdminFlag){ %> <li><a
href="Admin.aspx">Administration</a></li><%}; %>

that won't work because you need to have the property to bind immediately
following the <%# UserAdminFlag %>

I couldn't find any examples for what I am trying to do - maybe it can't
be
done this way.

thanks!
Bill
"Karl Seguin [MVP]" wrote:
Check out this link":
http://openmymind.net/index.aspx?documentId=8#4

there are a couple ways to do it (inline or in codebehind).

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Bill44077" <Bi*******@discussions.microsoft.com> wrote in message
news:F5**********************************@microsof t.com...
> Hi,
>
> I am trying to do something like this in html:
>
> <% if(user.isBrowseActive()) { %><td nowrap="nowrap" class="browse"><a
> href="swzBrowse">Browse</a></td><%}%>
>
> except I want to replace the user.isBrowseActive() with a declarative
> databinding statement like:
>
> <%# myProperty %>
>
> any ideas on how I can do this - been googling for a while with no
> luck.
>
> thanks in advance!
> Bill
>


Jan 27 '06 #5

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

Similar topics

9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
5
by: Dave | last post by:
Hi all, I'm new to ASP.NET and am working through a few exercises in a book to get up to speed. First, some background: I'm running SQL Server 2000 and have one field as a bit data type...
9
by: Timm | last post by:
I have an ASP.NET 2.0 page with two DropDownLists. I am using declarative data binding wherever possible and trying to minimize the use of code. The list of values in DropDownList DDL2 should be...
7
by: Richard | last post by:
I have a form with seven tapages. These span only one record with a large number of fields (textboxes). On Tabpage1 I display a number of read-only text boxes. This displays information about...
0
by: AMDRIT | last post by:
Hello everyone, VB2003-Winforms I have a class object (testclass), that I would like to bind parts of to two custom controls (control1 and control2). The testclass is stored in a hash table...
2
by: Nick | last post by:
Is there a way to do declarative security on abstract classes? I am working on a data access layer and would like to place all permission requirements on the base class so all inherited classes...
6
by: Catch_22 | last post by:
Hi, I have a large SQL Server 2000 database with 3 core tables. Table A : 10 million + records Table B : 2 million + records Table C : 6 million + records One of the batch tasks that I...
1
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid,...
5
by: Sam | last post by:
Hi, I have one table like : MyTable {field1, field2, startdate, enddate} I want to have the count of field1 between startdate and enddate, and the count of field2 where field2 = 1 between...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.