Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

The server tag is not well formed. ASP.net

Hi,

I'm fairly new to ASP.net. I'm getting the error message: The server tag is not well formed.
on line: -

                        <asp:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" runat="server"
                            ConfirmText="<%# Eval("Work Order") %>" + "r" Enabled="True" TargetControlID="ImageButton1">
                        </asp:ConfirmButtonExtender>
 



for confirmtext. What am I doing wrong please?

Many Thanks
Lee
0
Codingitup
Asked:
Codingitup
  • 3
  • 3
1 Solution
 
pivarCommented:
Hi,

I don't think you can use +. If you want the r try, or remove + "r":

<asp:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" runat="server"
                            ConfirmText="<%# Eval("Work Order") %>r" Enabled="True" TargetControlID="ImageButton1">
                        </asp:ConfirmButtonExtender>

/peter
0
 
CodingitupAuthor Commented:
No joy i'm afraid

Best Regards
Lee
0
 
ivan_vaguninCommented:
Try single single quotes for ConfirmText:
<asp:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" runat="server"
                            ConfirmText='<%# Eval("Work Order") %>r' Enabled="True" TargetControlID="ImageButton1">
                        </asp:ConfirmButtonExtender>
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
CodingitupAuthor Commented:
Hi,

It just shows the whole bit of code on confirm text as a string instead of the work order and the r at the end im afraid.

Best Regards
Lee
0
 
ivan_vaguninCommented:
This is a kind of bug or feature of ASP.Net - some attribute get's encoded, so server code is not executed for them:
http://www.west-wind.com/weblog/posts/2006/Apr/27/ASPNET-ItemTemplates-EVAL-and-embedding-dynamic-values-into-controls
So, I guess you need to use codebehind to populate ConfirmText.
0
 
CodingitupAuthor Commented:
so I presume I would have a function or something that would return the whole value as a string to put into the property? How do I go about doing that please as i'm pretty new to ASP.net and c#.

Many Thanks
Lee
0
 
ivan_vaguninCommented:
So did you find solution or still need sample?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now