Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
<#% eval %> - possible?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mike, post: 3084316"] it worked for my scenario, thanks. I'll keep that in mind for the future, thanks That is how I always do. Also I usually put those type of functions into <script runat=server"> on the aspx page itself rather than have them in .CS files Since I think they relate to GUI. Except the cases when I need to have standardized output across web site. I usually have static functions in my clsGlobal: OutputDate(), OutputMoney(). Thus I can switch my date format or currency in one place for every page pretty painlessly. George. OK, I'll give it a shot, and see if it will show the correct image based on the value passed to the routine You will have to create your own function for that in a code behind like public string GetName(object objName) { if( objName == null ) return "No Name"; else return (string)objName; } and call it <%# GetName(Eval("Name")) %> George Is it possible to do this in the HTML of the aspx page? <#% if Eval("Name") != null %> write something here <#% else %> show message for missing name <#% end if %> when I try this I get errors for missing (, or IF is not recognized, etc. how can I get this to work without adding it to the code behind? I need to do this in a GridView that is using template fields with links in the fields [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
<#% eval %> - possible?
Top