tags:

views:

41

answers:

3

Hello,

Is it possible to debug markup in ASP.Net projects ?

According to answers I would like to provide You an example:

<DataItemTemplate>
                <a href="RangeDetails.aspx?ObjectId=<%# Eval("Object1Id") %>&Type=<%# Eval("Type1") %>">
                    <%# Eval("Object1")%>
                </a>
            </DataItemTemplate>

And I would like to be able to check Object1 value as a sample.

Thanks for any hints

+2  A: 

Yes.

(If you were after anything more specific, I suggest you ask a more specific question!)

Jamiec
I've asked more specific question, Could You know help me with this ?
gruber
+1  A: 

snorlaks - yes and no.

you can include code in the markup as such:

<%  bool first = true;
    foreach (var rspGrpItem in Model.UnitSelect){
      %>

and then examine the variables where necessary. if you've got issues in the markup tho', i'd suggest examining the values that are in either your .cs files (if using asp.net webforms) or in the controller (if using asp.net MVC) 1st to be honest.

jim
controller? Where does the OP mention mvc?
Jamiec
ooops - jamie, you're correct, i'll correct that info... thanks
jim
+1  A: 

It is recommended that you do all your logic in Business or Data layer than ASP.NET markup. Additionally ASP.NET MVC is more testable than ASP.NET WebForms.

afsharm