ch. 14 exercise 3 question on hyperlink syntax
i have just started trying to do ch. 14 exercise 3. i thought of doing the hyperlink on the image but trouble getting it working. i took a look at just the beginning of your answer. i noticed your data binding snytax starts right after the NavigateUrl= (like NavigateUrl="<%# PhotoDetails.aspx?Id=..."). i expected the syntax to be more like
NavigateUrl="PhotoDetails.aspx?Id= <%# Eval('Id') %>"
or maybe
NavigateUrl="'PhotoDetails.aspx?Id=' + <%# Eval("Id") %>"
why do you begin the "<%#" right after the navigateUrl? Doesn't the compiler get confused by stuff other than the eval or bind statements being in there? Also, is there a way to construct the syntax as i was expecting that would work?
|