Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 30th, 2005, 07:57 PM
Authorized User
 
Join Date: Jun 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default error system.web.......

in my html doc ---> <asp:Button Text="Submit" Runat=server OnClick="update" id=Button1 />
in my code behind ---> Dim dblInput As Double = CDbl(input.Text)

if i remover the ".text" from the above line i get this error:

"value of type 'system.web.ui.webcontrols.textbox' cannot be converted to 'double'"



 
Old July 1st, 2005, 01:05 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

That is correct. If you remove the .text you are then referring to the control itself which cannot be converted to a double.

 
Old July 1st, 2005, 01:30 PM
Authorized User
 
Join Date: Jun 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks, that clears up alot
so the .text refers to the actual text in the control and the input part will refer to the control itself which obsviously can't be converted to a dbl

thanks!!!!!!

 
Old July 1st, 2005, 01:36 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

no problem :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
System.Web.Caching.Cache Error TrivediVishal ASP.NET 1.0 and 1.1 Basics 2 December 18th, 2006 06:58 PM
System.Web Error snowy0 VB.NET 2002/2003 Basics 12 October 14th, 2006 11:13 PM
System.Web.Mail dkb General .NET 3 August 25th, 2004 07:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.