Embedded code blocks in ASP.NET

Joined
Aug 1, 2007
Messages
1
Reaction score
0
Hi,

I was wondering if anybody could help me with a small problem of mine.

I am loading a page in a Read-Only statement, and have the following public property declared 'public bool IsReadOnly' returning 'false' in my Page.cs.

In the Page.aspx, I am using the property as followed in a LinkButton :

<asp:LinkButton ID="LinkButton" BorderStyle="None" Enabled='<%# IsReadOnly%>' runat="server" />

Problem is that this only seem to be working inside a GridView / TemplateField. Whenever I use this property outside of a GridView, it is ignored. Only the GridView's LinkButton calls it.

Any idea why?

Thanks,
Corbs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top