Error: The server tag is not well formed in ASP.Net

Last Reply on May 17, 2017 09:29 AM By AnandM

Posted on May 17, 2017 07:45 AM

 

                    <%--Modal 2 Start--%>
                    <div class="modal fade" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                        aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                        <span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title" id="H1">
                                        Other Details</h4>
                                </div>
                                <div id="modal1body" align="center" class="modal-body">
                                    <table class="tblCustomer" cellpadding="2" cellspacing="0" border="1">
                                        <tr>


                                          
                                            <td>
                                                 <b>Name: </b><span class="name">
                                                    <%# Eval("fName") %></span><br />
                                                 <b>Image: </b>
                                                <span class="image">
                                                    <asp:Image ID="Image1" runat="server" <%# Eval("FImageName") %>/></span>
                                                <br />
                                                <b>FriendUserName: </b><span class="friendusername">
                                                    <%# Eval("FriendUserName") %></span><br />
                                                <b>ShareContent: </b><span class="sharecontent">
                                                    <%# Eval("ShareContent") %></span><br />
                                                <b>ShareTodayDate: </b><span class="sharetodaydate">
                                                    <%# Eval("ShareTodayDate")%></span><br />
                                                <b>Comments: </b><span class="comments">
                                                    <%# Eval("Comments")%></span><br />
                                                <b>SharePostDate: </b><span class="sharepostdate">
                                                    <%# Eval("SharePostDate")%></span><br />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="modal-footer">
                                </div>
                            </div>
                        </div>

 

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The server tag is not well formed.

Source Error:


Line 205:                                                 <b>Image: </b>
Line 206:                                               
Line 207:                                                    <asp:Image ID="Image1" runat="server" <%# Eval("FImageName") %>/>
Line 208:                                                <br />
Line 209:                                                <b>FriendUserName: </b><span class="friendusername">
You are viewing reply posted by: AnandM on May 17, 2017 09:29 AM.
Posted on May 17, 2017 09:29 AM Modified on on May 17, 2017 09:30 AM
micah says:
<span class="image">
                                                    <asp:Image ID="Image1" runat="server" ImageUrl='<%# String.Format("PROFILEPHOTOS/{0}",Eval("FImageName").ToString()) %>' class="media-object img-rounded animated fadeInDown"
                                    style="width: 45px; height: 45px;"/>
 
                                                </span>

 replace above with below

<span >
    <asp:Image ID="Image1" runat="server" ImageUrl='<%# String.Format("PROFILEPHOTOS/{0}",Eval("FImageName").ToString()) %>' class="image media-object img-rounded animated fadeInDown"
        Style="width: 45px; height: 45px;" />
</span>

 

micah says:
$(".image", table).html(this.Image);

 and replace above with below

$(".image", table).attr('src', 'PROFILEPHOTOS/' + this.Image);