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 ??
|
|
|
 |
|