The reason for the error message is the data binding in the ImageUrl
attribute. In order to make this work you need to exchange the double quotes by single ones and adjust the data binding code:
<asp:Image ID="imgteacher" runat="server" Height="150" Width="248"
ImageUrl='<%# "ShowImage.ashx?id="+ DataBinder.Eval(Container.DataItem, "CourseID") %>'/>