0

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")%>"/>

1 Answer 1

3

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")%>'/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.