Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Trupti Patil   on Feb 06 In Asp.net Category.

  
Question Answered By: Saxon Anderson   on Feb 06

One thing to note with these things ::

Its easy to do this


<table>
<tr><td></td></tr>
<tr>
<# MyHelper(.......) >
</tr>
</table>

Myhelper(){
return "<td>hello</td>
}

which works at runtime but will play havoc with the VS designer. It will
probbaly fill in the missing  bits and add a TBODY and all sorts, and be a real
pain.
So make sure what's in the designer is valid html, even if that means outputting
more from the helper function.

<table>
<tr><td></td></tr>
<# MyHelper(.......) >
</table>


Myhelper(){
return "<tr><td>hello</td></tr>"
}

as if you didn't know already.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on problem with conditional output in templates Or get search suggestion and latest updates.


Tagged: