CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 .Net Compilation Error: Operator '+' cannot be app

Print topic Send  topic

Author Message
pirklk@hotmail.com
Posted: 03/21/2002, 10:26 AM

Im compiling my code in ASP.Net C# for a some Wizard generated screens from MS SQL databases. I run MakeAll then try to connect to the wizard generated (grid and edit one page) page and get the following error below from the .ASPX file. Note the extra '+' that gets put at column 65 right after <%# +"?" .... I think CC is forgeting to put the URL's Page before it.

Here is the error

Compiler Error Message: CS0023: Operator '+' cannot be applied to operand of type 'string'

Source Error:
Line 78: <asp:HyperLink id=sgenTemplates_sgenTemplateId NavigateUrl='<%# +"?"+"sgenTemplateId="+Server.UrlEncode(DataBinder.Eval(Container.DataItem, "s_sgenTemplateId").ToString()) +"&" +"s_sgenTemplateDesc=" + Server.UrlEncode(Utility.GetParam("s_sgenTemplateDesc")) + "&s_sgenTemplateName=" + Server.UrlEncode(Utility.GetParam("s_sgenTemplateName")) + "&"%>' style="font-size: 11px; color: #000000" runat="server"> <%#Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "s_sgenTemplateId").ToString()) %> </asp:HyperLink> 

I think It should be something like

Line 78: <asp:HyperLink id=sgenTemplates_sgenTemplateId NavigateUrl='<%# sgenTemplates_FormAction+"sgenTemplateId="+Serv....... etc

I've tried everything else. Im running very latest .NET SDK release and VS.Net.

Help
pirklk@hotmail.com
Posted: 03/21/2002, 11:50 AM

Never Mind... I closed CC and re-opened it and the problem went away. CC probably has a bug in it for beginning new projects and messing up this missing variable/page name. It fixed/populated it correctly after going back in and regenerating the code. There is some problem there but I don't have time to try and repeat the problem by making a new project and Wizard generating templates...

Now correct....
<asp:HyperLink id=sgenTemplates_sgenTemplateId NavigateUrl='<%# "sgenTemplatesRecord.aspx"+"?"+"sgenTemplateId="+Server.UrlEncode(DataBinder.Eval(Container.DataItem, "s_sgenTemplateId").ToString()) +"&" +"s_sgenTemplateDesc=" + Server.UrlEncode(Utility.GetParam("s_sgenTemplateDesc")) + "&s_sgenTemplateName=" + Server.UrlEncode(Utility.GetParam("s_sgenTemplateName")) + "&"%>' style="font-size: 11px; color: #000000" runat="server"> <%#Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "s_sgenTemplateId").ToString()) %> </asp:HyperLink> 

Thanks anyway.
SN
Posted: 03/22/2002, 12:28 AM

Which version of CC are you using ??

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.