an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > Product.DefaultImageID errs when addding anothe...
Last Post 3/14/2011 1:30:01 PM By Bahram. 1 replies.
3/14/2011 1:13:19 PM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Product.DefaultImageID errs when addding another code
Hi Luke,
 
This code on DefaultTemplate :
<p class="MsoNormal"><font color="#0000ff" size="2" face="Courier New"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt"><</span><font color="#a31515" size="2" face="Courier New"><span style="font-family: 'Courier New'; color: #a31515; font-size: 10pt">script</span><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt"> <span style="color: red">type</span><span style="color: blue">="text/javascript"</span> <span style="color: red">language</span><span style="color: blue">="javascript"><o:p></o:p></span></span>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">    <span style="color: blue">var</span> imageDict = <span style="color: blue">new</span> <st1:personname w:st="on">A</st1:personname>rray();<o:p></o:p></span>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">    <span style="color: blue">var</span> currentImageId = <%=Product.DefaultImageId ?? 0 %>; </span>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">Show without yellow highlights in  my main project while there is yellow <% %> in mty test project.</span>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">I run Windows Server 2008 and my main site using VS Express 2008 while on Test Server I use VS Express 2010.</span>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">When I add another code and want to run site it errs. While normally it works</span>

<p class="MsoNormal"> 

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">The same problem is also on ProductImages.ascx. </span>

<p class="MsoNormal"> 

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt">Thanks,</span>

<p class="MsoNormal"><font size="2" face="Courier New"><span style="font-family: 'Courier New'; font-size: 10pt"> </span>

3/14/2011 1:30:01 PM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Re: Product.DefaultImageID errs when addding another code
 
I get this error on runtime , on this line of code :

 

 

<font color="#0000ff" size="2"><font color="#0000ff" size="2">var  currentImageId = <%=Product.DefaultImageId ?? 0 %>;
on DefaultTemplate form
 
{"Object reference not set to an instance of an object."}
 
 
However I do not get error on my test site with the same code.