473,394 Members | 1,944 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,394 software developers and data experts.

Setting a controls property in the .aspx : Visible=<%#...%>

I would like to be able to set the Visible property of a placeholder to
'false/true' via a normal function call rather than in the codebehind.
What I am aiming for is something approximating this :
<asp:PlaceHolder runat="server" Visible=<%#
MyNs.Class.StaticPropertyGet%> />

This works fine, as I would expect it to, inline :
<b>The value is = (<%=(bool)MyNs.Class.StaticPropertyGet%>) </b>

Is there any way I can put this kind of statement into a control and
have it do something? It apparently ignores it right now, since it
doesn't crash.

I am trying to get something really simple to work here, rather than
writing yet another single purpose control with lots 'o logic.

TIA,

Andrew Backer

Nov 19 '05 #1
2 5260
<b>The value is = (<%=MyNs.Class.StaticPropertyGet.ToString()%>) </b>

"Andrew Backer" wrote:
I would like to be able to set the Visible property of a placeholder to
'false/true' via a normal function call rather than in the codebehind.
What I am aiming for is something approximating this :
<asp:PlaceHolder runat="server" Visible=<%#
MyNs.Class.StaticPropertyGet%> />

This works fine, as I would expect it to, inline :
<b>The value is = (<%=(bool)MyNs.Class.StaticPropertyGet%>) </b>

Is there any way I can put this kind of statement into a control and
have it do something? It apparently ignores it right now, since it
doesn't crash.

I am trying to get something really simple to work here, rather than
writing yet another single purpose control with lots 'o logic.

TIA,

Andrew Backer

Nov 19 '05 #2
IIRC it will do the tostring() automatically for you, but that is
neither here nor there (i hate it when ppl say that). It has been easy
to get to work in that context.

What I am trying to do is get that to work with a placeholder control.
All the versions that I try (that don't crash) do nothing to the
control, and the ones that work inline (not inside a server control)
all crap out. Why would it not crash, but still not do anything to the
'visible' property of the control?

I want to do something like this :

<asp:PlaceHolder runat="server" id="MyTest"
visible="<%# MyNs.Class.StaticPropertyGet %>">
.....
</asp:PlaceHolder>

Thanks in advance,
Andrew Backer
gmail://awbacker

Nov 19 '05 #3

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

Similar topics

4
by: Ian Rastall | last post by:
This really is a JavaScript question. I have a site that looks fine in everything but NN4. I'm afraid I don't have a URL, because the site is very much unfinished. The site is a header (which is...
1
by: Mike | last post by:
Hi, I have created a collection of a custom class. Everything works fine (can add these items in a combo from within a VB.NET application, for instance), but when looking at the collection from a...
2
by: James Cooke | last post by:
I want to set body attributes programmatically, from the module file: I can go into the .aspx file and say <body onload="myFunc()"> but I don't want to. Like you do with a textbox control: ...
3
by: | last post by:
I have been researching articles on google on how to create a simple RSS feed that sucks <title><blurb><link><date> out of a sql server 2000 database via an aspx page. I know it has to be pushed...
1
by: Mike | last post by:
Hi, I have created a collection of a custom class. Everything works fine (can add these items in a combo from within a VB.NET application, for instance), but when looking at the collection from a...
1
by: Bill Johnson | last post by:
In vb6 I could quickly go to any given property while in the properties window by holding the CTRL + SHIFT keys down plus the first letter of the property I want to edit. For example, if I wanted...
5
by: Nathan Sokalski | last post by:
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/> <add tagPrefix="NATE"...
1
by: José Joye | last post by:
We have created some Assembly level Custom Attribute and we are searching for a way to display them when using the file property menu for the assembly ("version" tab). So far, we did not find any...
0
by: Chetana | last post by:
Hi, Following code is working in FireFox, but it is not working in IE. Response.Write("<script>window.opener.location.href='ViewDepartment.aspx';</ script>"); So Please Let me know if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.