Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > IIF testing value of other controls to set ENABLED

Reply
Thread Tools

IIF testing value of other controls to set ENABLED

 
 
jobs
Guest
Posts: n/a
 
      07-24-2007
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") %>' />

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      07-25-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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") %>' />
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How is IIF evaluated? tshad ASP .Net 9 10-20-2005 08:06 PM
IIF Function Sparky Arbuckle ASP .Net 5 09-07-2005 01:27 PM
iif not working =?Utf-8?B?cm9kY2hhcg==?= ASP .Net 4 06-03-2005 08:31 PM
IIF problem Vishal ASP .Net 0 11-29-2004 07:21 PM
Easy question, IIF and Convert with DBNulls Max ASP .Net 2 10-11-2004 08:49 PM



Advertisments