Ask a Question related to ASP.NET General, Design and Development.
-
Andy Crawford #1
How to turn Strict "off"?
Even though I have set Strict Off, it is still on, thus causing this error.
Here is the code in a templated Column of a DataGrid: (XPpro, Framework 1.1)
<ItemTemplate>
<TABLE width="100%">
<TR>
<TD class="gridItemStyleNormal" align="left" width="50%"><%# Databinder.Eval(Container.DataItem, "CustomerName") %></TD>
<TD class="gridItemStyleNormal" align="left" width="30%"><%# Databinder.Eval(Container.DataItem, "BusinessCategoryDesc") %></TD>
<TD class="gridItemStyleNormal" align="left" width="20%"><%# Databinder.Eval(Container.DataItem, "NameFirst") + " " + Databinder.Eval(Container.DataItem, "NameLast") %></TD>
</TR>
</TABLE>
</ItemTemplate>
--------------------------------------------------------------------------------
The error message says:
C:\winnt\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.ex e" /t:library /utf8output /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll"/R:"c:\winnt\assembly\gac\system.web.services\1.0.5 000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.500 0.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temp orary asp.net files\uniprowebapplication1\03182950\6e42cb10\asse mbly\dl2\0323ba7e\207b2def_2547c301\uniprodatatier 1.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system..data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temp orary asp.net files\uniprowebapplication1\03182950\6e42cb10\asse mbly\dl2\13199096\b026eaf0_2547c301\uniprowebappli cation1.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temp orary asp.net files\uniprowebapplication1\03182950\6e42cb10\n-6ek_3q.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Te mporary ASP.NET Files\uniprowebapplication1\03182950\6e42cb10\3uim ztuq.dll" /D:DEBUG=1 /debug+ /win32resource:"C:\WINNT\Microsoft.NET\Framework\v1 .1.4322\Temporary ASP.NET Files\uniprowebapplication1\03182950\6e42cb10\3uim ztuq.res" "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempor ary ASP.NET Files\uniprowebapplication1\03182950\6e42cb10\3uim ztuq.0.vb"
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
D:\Documents and Settings\AWC\My Documents\UniPro\UniproWebApplication1\frmCustomer Select.aspx(60) : error BC30038: Option Strict On prohibits operands of type Object for operator '+'.
target.SetDataBoundString(2, System.Convert.ToString(Databinder.Eval(Container. DataItem, "NameFirst") + Databinder.Eval(Container.DataItem, "NameLast")))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Documents and Settings\AWC\My Documents\UniPro\UniproWebApplication1\frmCustomer Select.aspx(60) : error BC30038: Option Strict On prohibits operands of type Object for operator '+'.
target.SetDataBoundString(2, System.Convert.ToString(Databinder.Eval(Container. DataItem, "NameFirst") + Databinder.Eval(Container.DataItem, "NameLast")))
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
When you look at the compiled part is shows Strick On.
Line 1: '------------------------------------------------------------------------------
Line 2: ' <autogenerated>
Line 3: ' This code was generated by a tool.
Line 4: ' Runtime Version: 1.1.4322.573
Line 5: '
Line 6: ' Changes to this file may cause incorrect behavior and will be lost if
Line 7: ' the code is regenerated.
Line 8: ' </autogenerated>
Line 9: '------------------------------------------------------------------------------
Line 10:
Line 11: Option Strict On
Line 12: Option Explicit On
Line 13:
Line 14: Imports ASP
Line 15: Imports Microsoft.VisualBasic
Line 16: Imports System
I have replaced "Strick On" with "Strict Off" in all projects, but it still thinks it's on. I also changed the Build options for each project.
Where is it getting set ON???? I even set Explicit Off, but it didn't change either.
Thanks,
Andy
[email]ac411@bellsouth.net[/email]
Andy Crawford Guest
-
How to "turn off" form functions...
Hi all! I created a form. People filled it out. Now I need to collect all the filled-out pdfs and put them into one, final document. Is there a way... -
WORD bullet points turn into "??"
Can anyone please advise why when I use the quick option to make Acrobat documents (ie use PDFWriter instead of distiller) from a WORD document I end... -
Is there a setting to allow $var = "" when POST and GET vars are strict?
I have the following problem: $_POST and $_GET variables can only be used when in the correct format (not $val), but when I define a variable... -
how to "bless" while "strict"?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm working through perlboot right now and have run up against a minor challenge. Unlike the... -
Q: "my" variables and "no strict 'refs'"
The bottom of p.594 in the Camel book (3rd edition) says this: no strict 'refs'; $name = "variable"; $$name = 7 ; # Sets $variable to 7 ... -
Cowboy \(Gregory A. Beamer\) #2
Re: How to turn Strict "off"?
You may not have strict really off. YOu need to check the project file and make sure it is set to off there, as well, as Strict can be set on a project basis. Also, check the @ directive in the page. It may be something like:
<%@ Page language="VB" CodeBehind="ThisPage.aspx.vb" strict="on" %>
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Author: ADO.NET and XML: ASP.NET on the Edge
************************************************** ******************************
Think Outside the Box!
************************************************** ******************************
"Andy Crawford" <ac411@bellsouth.net> wrote in message news:phlPa.337$x%5.210@fe03.atl2.webusenet.com...
Even though I have set Strict Off, it is still on, thus causing this error.
Here is the code in a templated Column of a DataGrid: (XPpro, Framework 1.1)
<ItemTemplate>
<TABLE width="100%">
<TR>
<TD class="gridItemStyleNormal" align="left" width="50%"><%# Databinder.Eval(Container.DataItem, "CustomerName") %></TD>
<TD class="gridItemStyleNormal" align="left" width="30%"><%# Databinder.Eval(Container.DataItem, "BusinessCategoryDesc") %></TD>
<TD class="gridItemStyleNormal" align="left" width="20%"><%# Databinder.Eval(Container.DataItem, "NameFirst") + " " + Databinder.Eval(Container.DataItem, "NameLast") %></TD>
</TR>
</TABLE>
</ItemTemplate>
--------------------------------------------------------------------------------
The error message says:
C:\winnt\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\vbc.ex e" /t:library /utf8output /R:"c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c 561934e089\system.dll"/R:"c:\winnt\assembly\gac\system.web.services\1.0.5 000.0__b03f5f7f11d50a3a\system.web.services.dll" /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\system.drawing\1.0.5000.0 __b03f5f7f11d50a3a\system.drawing.dll" /R:"c:\winnt\assembly\gac\system.web.mobile\1.0.500 0.0__b03f5f7f11d50a3a\system.web.mobile.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temp orary asp.net files\uniprowebapplication1\03182950\6e42cb10\asse mbly\dl2\0323ba7e\207b2def_2547c301\uniprodatatier 1.dll" /R:"c:\winnt\assembly\gac\system.data\1.0.5000.0__b 77a5c561934e089\system..data.dll" /R:"c:\winnt\assembly\gac\system.enterpriseservices \1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseser vices.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temp orary asp.net files\uniprowebapplication1\03182950\6e42cb10\asse mbly\dl2\13199096\b026eaf0_2547c301\uniprowebappli cation1.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\temp orary asp.net files\uniprowebapplication1\03182950\6e42cb10\n-6ek_3q.dll" /R:"c:\winnt\assembly\gac\system.web\1.0.5000.0__b0 3f5f7f11d50a3a\system.web.dll" /out:"C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Te mporary ASP.NET Files\uniprowebapplication1\03182950\6e42cb10\3uim ztuq.dll" /D:DEBUG=1 /debug+ /win32resource:"C:\WINNT\Microsoft.NET\Framework\v1 .1.4322\Temporary ASP.NET Files\uniprowebapplication1\03182950\6e42cb10\3uim ztuq.res" "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempor ary ASP.NET Files\uniprowebapplication1\03182950\6e42cb10\3uim ztuq.0.vb"
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.
D:\Documents and Settings\AWC\My Documents\UniPro\UniproWebApplication1\frmCustomer Select.aspx(60) : error BC30038: Option Strict On prohibits operands of type Object for operator '+'.
target.SetDataBoundString(2, System.Convert.ToString(Databinder.Eval(Container. DataItem, "NameFirst") + Databinder.Eval(Container.DataItem, "NameLast")))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\Documents and Settings\AWC\My Documents\UniPro\UniproWebApplication1\frmCustomer Select.aspx(60) : error BC30038: Option Strict On prohibits operands of type Object for operator '+'.
target.SetDataBoundString(2, System.Convert.ToString(Databinder.Eval(Container. DataItem, "NameFirst") + Databinder.Eval(Container.DataItem, "NameLast")))
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
When you look at the compiled part is shows Strick On.
Line 1: '------------------------------------------------------------------------------
Line 2: ' <autogenerated>
Line 3: ' This code was generated by a tool.
Line 4: ' Runtime Version: 1.1.4322.573
Line 5: '
Line 6: ' Changes to this file may cause incorrect behavior and will be lost if
Line 7: ' the code is regenerated.
Line 8: ' </autogenerated>
Line 9: '------------------------------------------------------------------------------
Line 10:
Line 11: Option Strict On
Line 12: Option Explicit On
Line 13:
Line 14: Imports ASP
Line 15: Imports Microsoft.VisualBasic
Line 16: Imports System
I have replaced "Strick On" with "Strict Off" in all projects, but it still thinks it's on. I also changed the Build options for each project.
Where is it getting set ON???? I even set Explicit Off, but it didn't change either.
Thanks,
Andy
[email]ac411@bellsouth.net[/email]
Cowboy \(Gregory A. Beamer\) Guest
-
Andrew Crawford #3
Re: How to turn Strict "off"?
I don't want to turn off the Strict or Explicit. Can you suggest a
better way to concatenate two fields in a templated column?
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Andrew Crawford Guest
-
Kevin Spencer #4
Re: How to turn Strict "off"?
You need to cast the values as strings.
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
[url]http://www.takempis.com[/url]
Big things are made up
of lots of little things
"Andrew Crawford" <ac411@bellsouth.net> wrote in message
news:eSMiZ5ISDHA.1924@TK2MSFTNGP12.phx.gbl...> I don't want to turn off the Strict or Explicit. Can you suggest a
> better way to concatenate two fields in a templated column?
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Kevin Spencer Guest



Reply With Quote

