Question : ASP.NET Compilation Error

Hello,

I am running through an example in a book and can't seem to get the code to run.  Can anyone see where my problem is in the attached file?  I am not very familiar with ASP.NET.

Right now I am running into a compilation error at Line 27.

Thanks in advance.

--Charly
1:
2:
3:
4:
5:
6:
7:
8:
9:
Compiler Error Message: CS0103: The name 'IsNotFixed' does not exist in the current context

Source Error:

Line 25:                         <asp:TemplateField ShowHeader="False">
Line 26:                             <ItemTemplate>
Line 27:                                 <asp:LinkButton Visible='<%# IsNotFixed((bool)Eval("Fixed")) %>' ID="lnkMarkAsFixed"
Line 28:                                     runat="server" 
Line 29:                                     CausesValidation="false"
Attachments:
 
Contains the aspx file and its accompanying code behind file
 

Answer : ASP.NET Compilation Error

Do you have a method named IsNotFixed in your code-behind?

If not, create a method something like below:

protected bool IsFixed(bool isFixed)
{
   // do your logic here
   return isFixed;
}

Arun
Random Solutions  
 
programming4us programming4us