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: 43 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:













is there a way to execute class every xx minute?

split function and working with arrays

cassini web server

detecting errors...

session variable, need help!!

datetime -- > problem in converting textbox value into datetime variable

i want application 'a' to run within another sites html page

configurationsettings

display a list of hyperlinks

tooltip with "more" tab

can asp and asp.net be onthe same web server ?

how to write my asp.net blog?

embedded excel

mfc in .net ??

unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

what happens when session expires?

help with encrypt and decrypt

getting a datalist to work

consume web service help

sorting dataset

server.transfer in criticism of the asp.net 2.0 compilation model

click and drag functionallity - webapp

using pre-compilation with a deployment project.

help w/ appl. architecture--plzzzzz

response object problem

sql next to max record?

how to import namespace

just getting started, a few questions

pass two values in querystring

custom namespaces with asp.net = too much hassle?

how to do encript and decript?

[2005] aspx sending email [doesnt sent to hotmail] ??

using vs 2005 to work on asp.net 1.1 site?

asp>net blogging software

shared method or non shared method

calling pages multiple times

framework reversion nightmare

stupid error, # appends to qs

ms web matrix problem

compatibility

build asp.net 2.0 application in release mode

backporting from asp.net 2 to asp.net 1?

click event on button

need forum code

how to create blog?

add windows account to webserver

declaring variables question

label tag and its value?

uploading and downloading documents

problems in populating treeview

   
  Privacy | Contact Us
All Times Are GMT