Subject: error system.web.......
Posted By: anpham Post Date: 6/30/2005 7:57:48 PM
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'"



Reply By: jbenson001 Reply Date: 7/1/2005 1:05:39 AM
That is correct.  If you remove the .text you are then referring to the control itself which cannot be converted to a double.

Reply By: anpham Reply Date: 7/1/2005 1:30:51 PM
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!!!!!!

Reply By: jbenson001 Reply Date: 7/1/2005 1:36:02 PM
no problem  :)


Go to topic 32361

Return to index page 518
Return to index page 517
Return to index page 516
Return to index page 515
Return to index page 514
Return to index page 513
Return to index page 512
Return to index page 511
Return to index page 510
Return to index page 509