asp.net inline code <%# MyboolVal %> -


I'm missing some idiots here but I can not see it. For example:

  & lt; Panel runat = "server" id = "myid" visible = '& lt;% # myboolVal% & gt;' & Gt; My work uses inline code on my site, for example: some stuff & lt; / Panel & gt;  

It seems that works very well for them, the panel will display when their status is complete.

I am trying to use a similar approach to a site at my home (this late Friday evening is not the best idea at this point to ask my boss). I can not produce anything of this. I have tried in the visual field which was not working, so I thought I would write something on the screen:

   

But I did not get any output from the inline code. "Some text" appears, but there is no "mei" or bull value.

I am currently in control of the user but do not imagine that this will be the reason.

Any thoughts please?

Thanks

Edit ....

Okay so thanks to Freddy Rios for the answer I can get the text to appear but When I try:

  visible = '& lt;% = mybool% & gt;'  

I get an error in this compilation:

System from your string representation for the visible property. Can not create boolean type object

I am really confused as to what is happening, I should be part of this process under this BOAT.

Edit 2:

I get an error on 123:

  & lt; Fieldet class = "myclass" id = "projectarea" runat = "server" visible = '& lt;% = ShowProjectSearchArea% & gt;' & Gt;  

ShowProjectSearchArea is my bool value, set to false.

If I double click the error in the error list window then I get the following in a popup, which I have never seen before:

  file ' % 1 'can not be opened in this solution.  

In your version Try to use = instead of #:

  & lt; P & gt; Some text & lt;% = String.Format ("meeee {0}", MyBool)% & gt; & Lt; / P & gt; ## for the database, so there should be a call to databind anywhere in the original code. 


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -