473,412 Members | 4,127 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,412 software developers and data experts.

IIF testing value of other controls to set ENABLED

If done something like this before:
<asp:Button ID="Run" SkinID="Button" Text="Run" CommandArgument='<
%#Eval("Jobname") %>' CommandName="Run" Enabled='<%#
IIF(Container.DataItem("isrunning")= "TRUE", "FALSE" , "TRUE") %>'
runat="server" />
</ItemTemplate>
</asp:TemplateField>

Can I do something like this? to test the value of another control?
It's not working. Also, any way to something like a case?
<asp:TextBox ID="DateOfBirthTextBox"
enabled='<%# IIF(RESPONSE.WRITE(CashButton.selectedvalue) = "Cash" ,
"FALSE") %>'
runat="server" SkinID="Retailer" Text='<%# Bind("DateOfBirth") %>' />

Jul 24 '07 #1
1 1529
Welcome to Asp.Net!

The most flexible way of databinding is handling RowDataBound event. The
event fires for every row as it gets databound. You can access every the
fields of the DataItem and the columns and controls on the row as you wish
for checking and setting their properties.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"jobs" <jo**@webdos.comwrote in message
news:11**********************@r34g2000hsd.googlegr oups.com...
If done something like this before:
<asp:Button ID="Run" SkinID="Button" Text="Run" CommandArgument='<
%#Eval("Jobname") %>' CommandName="Run" Enabled='<%#
IIF(Container.DataItem("isrunning")= "TRUE", "FALSE" , "TRUE") %>'
runat="server" />
</ItemTemplate>
</asp:TemplateField>

Can I do something like this? to test the value of another control?
It's not working. Also, any way to something like a case?
<asp:TextBox ID="DateOfBirthTextBox"
enabled='<%# IIF(RESPONSE.WRITE(CashButton.selectedvalue) = "Cash" ,
"FALSE") %>'
runat="server" SkinID="Retailer" Text='<%# Bind("DateOfBirth") %>' />

Jul 25 '07 #2

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

Similar topics

3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
4
by: Adam Parkin | last post by:
Hi all, what I want to do is write a function to toggle the enabled field of all controls within a frame, but what I can't figure out is how does one iterate through all controls in a frame object?...
21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
5
by: Brian | last post by:
Hello all.. Am working on an Air Hockey game... have an table loaded into a picture box. The borders of the table are slightly slanted. Am using hit testing lines with GDI+ to manipulate the...
1
by: Tina | last post by:
I have a DataGrid Item from the header row of a 1.1 DataGrid. I got it by saying... Dim HeaderItem As DataGridItem = mygrid.Controls(0).Controls(0) Now I'm looping through the Header item...
3
AccessIdiot
by: AccessIdiot | last post by:
I was successful with help from another thread (this one ) in enabling and disabling a form/subform with a button. Essentially you press a button on the form and the form controls are disabled but...
7
by: John Smith | last post by:
Hello, I have a simple question, I have a vb.net form with several buttons. If I store the name of a button in a variable.. Dim TheName as string TheName = ...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
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
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
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...
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
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,...
0
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.