asp.net - In ASCX-control not doing IF/ELSE condition -


ASCX controls that program loaded on the page. In a repeater control, depending on the conditions, sets a separate group of columns and datatellos with columns.

Then, on the ASPX-page, this work is good.

  & lt; Item Theme & gt; & Lt; Tr class = "objectrow" href = "& lt;% # getCompleteView object link (convert toInt32 (Eval (" ID_Object "))% & gt;" & Gt; & Lt; Td align = "center" square = "c1" & gt; & Lt;% # Eval ("ID_Object")% & gt; & Lt; / TD & gt; & Lt;% if (GetObjectTypeName () == "SOT") {%> & Lt; Td align = "center" square = "c6" & gt; & Lt;% # Eval ("SOTName")! = DBNull.Value? Eval ("SOTName"): ""%> & Lt; / TD & gt; & Lt;%}% & gt; ............................  

but the program loaded ASCX-control I. One exception is:

Error: Data Binding: 'System.Data.DataRowView' does not have a property named SOTName.

and the other is not consistent: my breakpoint on line in ASPX-page

The work was off but ACC was not in control.

Please, help! Why is behavior so different? how are you?

Check your data for the actual lines, that is, the line number? I can bet that your datasource is empty.

I do not think that when you feel that you should be then you are getting the data.

User control page load event will be executed before the aspx page load. If you are getting certain types of parameters for your query in .px in the page load in .aspx, then you should get it in the page_inte of .aspx.


Comments