Reputation: 23
I want to call method of a particular class to assign a text to asp.net control. Throwing error called server tag not well formed. Note: no server side code
<asp:button id="btn" runat="server" text="<%#class1.getText("btn")%>"/>
Upvotes: 0
Views: 306
Reputation: 11238
when you're doing inline code like this, you have to use single quotes to distinguish the start and end of the text
value.
<asp:button id="btn" runat="server" text='<%#class1.getText("btn")%>'/>
Upvotes: 3