CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: Date Entered: 8/4/2007 7:04:38 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 3 Views: 50 Favorited: 0 Favorite
4 Items, 1 Pages 1 |< << Go >> >|
"saisai" <>
NewsGroup User
I have problem compute the total8/4/2007 7:04:38 AM

0

Cart.aspx 

Private order As Order

lblSubtotal.Text = order.SubTotal.ToString("c")

 

Order.class

Public ReadOnly Property SubTotal() As Decimal

Get

Dim d As Decimal = 0D
For Each item As CartItem In Cart.GetItems()

d += item.Total

Next

Return d

End Get

End Property

 

Error Msg

 Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

"rmaiya" <>
NewsGroup User
Re: I have problem compute the total8/4/2007 3:44:56 PM

0

 looks like you are directly referencing the class, from your listing it is not clear about your object hierarchy but my guess would be

Public ReadOnly Property SubTotal() As Decimal

Get

Dim d As Decimal = 0DFor Each item As CartItem In Me.Cart.GetItems()

d += item.Total

Next

Return d

End Get

End Property

 

 


Raghu
(MCSD.NET, MCAD.NET, MCDBA)
[Don't forget to click on Mark as answer on the post that helped you ]
"saisai" <>
NewsGroup User
Re: I have problem compute the total8/4/2007 6:48:07 PM

0

if i give u the whole code is it easy for to solve the problem

 

"rmaiya" <>
NewsGroup User
Re: I have problem compute the total8/5/2007 2:33:57 PM

0

 yeah... that will be great


Raghu
(MCSD.NET, MCAD.NET, MCDBA)
[Don't forget to click on Mark as answer on the post that helped you ]
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:













how to ...public variable like in vb

what exactly and physically is cache ?

generating xaml serversided

what if i use dreamweaver to build the html?

please provide me link for calender for asp.net 2.0?

arrays

installing asp.net 2.0 without whidbey?

htmlinputtext control

trouble with db insert with multiple file upload using parameters

null woes.

can i run asp.net application

iis 6.0 on xp pro-sp2 config error (aspnet_regis -i output included)

compare a date in 1 namespace with a date in another

how do i register asp.dll on vista machine ?

.net sending an email

how to use class library

difference between session and formsauthenticate

tortoisesvn

dynamic subroutine call

time??

gethostentry & gethostbyaddress issue

standard resolution?

compare strings, show differences

asp.net ane web cams????

overlay images in asp.net

managing static pages...

non-shared member referenceing error

demo pages for the code pages

better to not import namespaces?

how can i run a method in a specific date or time ?

unable to find script library '/aspnet_client/1_1_4322/webuivalidation.js'. revisited

anyone have experience building site with japanese?

quick question

postback results in page cannot be displayed

should we go asp.net now or wait till 2.0

which one to start from?

declaring database results as variable

webservices, firewalls, and intranet/internet security

? operator

object reference not set to an instance of an object error

imagebutton

javascript email domain validation

why icollection for a listbox

get a remote drive's free space

data caching

easy question regarding class name & method name dropdown lists at tope of vs

modal refresh parent

wpf,wcf

building solution file

can i set dynamicmenuitem width based on staticmenuitem width??

   
  Privacy | Contact Us
All Times Are GMT