c# repeater CS1026: ) expected
-
10 Mei 2012 1:10
first time using the repeater
i am getting CS1026: ) expected
on this line <%# DataBinder.Eval(Container.DataItem, "Title")%>
i get the same error with <%# "Hello World"%>
if i swap out the # for = Container goes out of scope.
what can i do to overcome the error?
also i would like to understand what <%# is as opposed to <%=
Semua Balasan
-
10 Mei 2012 2:01
Hi,
this forum is for questions about html, css and scripting for webdevelopers using msie browsers.
You question would be better suited in a c# forum.... VS has intellisence.... display the error console in VS and double click on the error item to display the online help about the error number.
Rob^_^
- Disarankan sebagai Jawaban oleh doctoroftypeMVP 10 Mei 2012 2:02
- Ditandai sebagai Jawaban oleh Allen Li - MSFTModerator 25 Mei 2012 2:31
-
10 Mei 2012 4:58
sorry
is there a way to delete this thread?
- Diedit oleh Clow808 10 Mei 2012 5:06
-
10 Mei 2012 6:18You should be able to see a delete link on your opening question.
Rob^_^
-
10 Mei 2012 13:22
nope just reply & quote.
my reply's have a delete but not the question.
- Diedit oleh Clow808 10 Mei 2012 13:23
-
16 Mei 2012 1:51Moderator
Hi, the following codes are correct.
<%# DataBinder.Eval(Container.DataItem, "Title")%>
Regarding:
<%# "Hello World"%>
Since it will only output "Hello World" string, you can just put
Hello World
on your markup. Regarding the error message, it can occur due to some error with behind codes. Please set breakpoints to your behind codes and debug them. Additionally, since this issue is related to ASP.NET, you can also post your issue to ASP.NET forum:
- Ditandai sebagai Jawaban oleh Allen Li - MSFTModerator 25 Mei 2012 2:31