O
onearth
Hello
I tried this.. what i did:
1) I added to my Grid ASPX - <%@ Register TagPrefix="pflr" TagName
="pflr" Src= "DBMatesUsrCntrl.ascx" %>
2) I created a new usercontrol and pasted the following code (same code
as yours, but i changed the field names to fit my database)
<%@ Control Language="C#" ClassName="DBMatesUsrCntrl" %>
<asp:TemplateField HeaderText="Gegevens">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Trim(
Server.HtmlEncode(
Eval("CustomerID").ToString & " " & Eval("CustomerName").ToString & " "
&
Eval("CustomerAddress").ToString ) ).replace( " ", " " ).Replace( " ",
" " )
& "<BR>" & BankOfGiro( Eval("CustomerPhone").ToString,
Eval("CustomerPhone2").ToString, Eval("CustomerPhone3" ).ToString,
Eval("CustomerPhone4" ).ToString ) %>'></asp:Label>
<pflrflr ID="pflr1" runat="server" />
</ItemTemplate>
<ItemStyle Wrap="False" />
</asp:TemplateField>
I get error in the UserControl: Error: Unknown server tag 'pflrflr'.
and
Error:Unrecognized tag prefix or device filter 'pflr'.
and
Error:Element 'Label' is not a known element. This can occur if there
is a compilation error in the Web site.
I guess i am doing something wrong..
I tried this.. what i did:
1) I added to my Grid ASPX - <%@ Register TagPrefix="pflr" TagName
="pflr" Src= "DBMatesUsrCntrl.ascx" %>
2) I created a new usercontrol and pasted the following code (same code
as yours, but i changed the field names to fit my database)
<%@ Control Language="C#" ClassName="DBMatesUsrCntrl" %>
<asp:TemplateField HeaderText="Gegevens">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Trim(
Server.HtmlEncode(
Eval("CustomerID").ToString & " " & Eval("CustomerName").ToString & " "
&
Eval("CustomerAddress").ToString ) ).replace( " ", " " ).Replace( " ",
" " )
& "<BR>" & BankOfGiro( Eval("CustomerPhone").ToString,
Eval("CustomerPhone2").ToString, Eval("CustomerPhone3" ).ToString,
Eval("CustomerPhone4" ).ToString ) %>'></asp:Label>
<pflrflr ID="pflr1" runat="server" />
</ItemTemplate>
<ItemStyle Wrap="False" />
</asp:TemplateField>
I get error in the UserControl: Error: Unknown server tag 'pflrflr'.
and
Error:Unrecognized tag prefix or device filter 'pflr'.
and
Error:Element 'Label' is not a known element. This can occur if there
is a compilation error in the Web site.
I guess i am doing something wrong..