473,322 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Input string in incorrect form..Help needed urgently!!

have got an error which says Input string was not in a correct format. as follows..

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.FormatException: Input string was not in a correct format.

Source Error:

Line 237: Dim validNow As Integer = 1
Line 238: 'Dim jobAmount As Decimal = JobInformation.GetJobAmt(classiDDL.SelectedValue)
Line 239: Dim jobAmount As Decimal = Convert.ToDecimal(JobInformation.GetJobAmt(CInt(cl assiDDL.SelectedValue)))
Line 240: 'Dim jobAmount As Decimal = Convert.ToInt32(JobInformation.GetJobAmt(classiDDL .SelectedValue))
Line 241: Dim reason, message As String


Source File: \\hera\webroot$\veyo\chits\CCLChits\CreateCCLChit. aspx.vb Line: 239

Stack Trace:

[FormatException: Input string was not in a correct format.]
Microsoft.VisualBasic.CompilerServices.DoubleType. Parse(String Value, NumberFormatInfo NumberFormat) +195
Microsoft.VisualBasic.CompilerServices.IntegerType .FromString(String Value) +95

[InvalidCastException: Cast from string "" to type 'Integer' is not valid.]
Microsoft.VisualBasic.CompilerServices.IntegerType .FromString(String Value) +210
veyo.CreateCCLChit.NextButton1_Click(Object sender, EventArgs e) in \\hera\webroot$\veyo\chits\CCLChits\CreateCCLChit. aspx.vb:239
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292


here is the code which i am using..............

Expand|Select|Wrap|Line Numbers
  1.  Dim jobAmount As Decimal = Convert.ToDecimal(JobInformation.GetJobAmt(CInt(classiDDL.SelectedValue)))
  2.  
  3.         If Not chitEdit Then
  4.             ' ====  If only the above is satisfied, continue with the CCL. ====
  5.             If Not transfer Then
  6.                 Utilities.CreateMessageAlert(Me, message, "alert")
  7.                 Return
  8.             End If
  9.  
  10.             ' Create CCL chit
  11.             ' -------------------
  12.  
  13.  
  14.         Else 'i.e. chitEdit = true
  15.  
  16.             If Not transfer Then
  17.                 Return
  18.             End If
  19.  
  20.             chitID = CInt(ChitIDLabel.Text)
  21.  
  22.             If Not Chit.EditChit(chitID, caseID, chitDate, chitSigneeRCN, chitSigneeDesigID, _
  23.                     effectiveDate, RemarksAndCC1.ChitRemarks(), CInt(Context.Items("userID"))) Then
  24.                 'Error to user : ERROR in saving edited chit.
  25.                 Response.Redirect("/veyo/Error.aspx?eid=21&chitID=" & chitID)
  26.                 Return
  27.             End If
  28.  
  29.  
  30.             'JobPanel.Enabled = False
  31.  
  32.  
  33.  
  34.             ' Delete all Havaalaadhey CaseIDs and add new
  35.             If Not DeleteHavaalaadheyCaseIDs(chitID) Then
  36.                 Response.Redirect("/veyo/Error.aspx?eid=42&chitID=" & chitID)
  37.                 Return
  38.             End If
  39.  
  40.             If Not SaveHavaalaadheyCaseIDs(caseID, chitID) Then
  41.                 Response.Redirect("/veyo/Error.aspx?eid=41&chitID=" & chitID)
  42.                 Return
  43.             End If
  44.  
  45.             ' Delete and Save Chit CC Offices
  46.             If Not DeleteChitCCOffices(chitID) Then
  47.                 Response.Redirect("/veyo/Error.aspx?eid=45&chitID=" & chitID)
  48.                 Return
  49.             End If
  50.  
  51.             If Not InsertChitCCOffices(chitID, RemarksAndCC1.GetCCOfficeList) Then
  52.                 Response.Redirect("/veyo/Error.aspx?eid=44&chitID=" & chitID)
  53.                 Return
  54.             End If
  55.  
  56.  
  57.             ' Edit Job History
  58.             If Not JobInformation.UpdateJobHistory(RCN, chitID, effectiveDate, chitDate, _
  59.                 BridgeUntilTB.Text, RemarksAndCC1.ChitRemarks, Context.Items("userID")) Then
  60.                 Response.Redirect("/veyo/Error.aspx?eid=50&chitID=" & chitID)
  61.                 Return
  62.             End If
  63.  
  64.             ' Delete any Additional Remarks previously written and
  65.             ' check whether there are any additional remarks for original copy and save that
  66.             ' tbl_chitsAdditionalRemarks
  67.             If Not DeleteChitAdditionalRemarks(chitID) Then
  68.                 Response.Redirect("/veyo/Error.aspx?eid=47&chitID=" & chitID)
  69.                 Return
  70.             End If
  71.  
  72.             If Not RemarksAndCC1.OriginalCopyChitRemarks = "" Then
  73.                 Chit.InsertChitAdditionalRemarks(chitID, RemarksAndCC1.OriginalCopyChitRemarks)
  74.             End If
  75.  
  76.             Dim pathname As String = Chit.GetDisplayURL(chitType) & "?chitID=" & chitID
  77.             Response.Redirect(pathname)
  78.  
  79.  
  80.         End If
  81.  
  82.     End Sub
  83.  
  84.     Private Sub ClassDDL_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClassDDL.SelectedIndexChanged
  85.         toSalaryDDL.DataSource = JobInformation.GetClassSalaries(ClassDDL.SelectedValue)
  86.         toSalaryDDL.DataTextField = "salary"
  87.         toSalaryDDL.DataValueField = "classSalID"
  88.         toSalaryDDL.DataBind()
  89.         toSalaryDDL.Enabled = True
  90.  
  91.         classiDDL.DataSource = JobInformation.GetClassSalaries(ClassDDL.SelectedValue)
  92.         classiDDL.DataTextField = CInt("classID")
  93.         classiDDL.DataValueField = "classSalID"
  94.         'classiDDL.SelectedValue = Nothing
  95.         classiDDL.DataBind()
  96.         classiDDL.Enabled = True
  97.  
  98.     End Sub 
Sep 14 '06 #1
0 2517

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tom | last post by:
I'm trying to find a good, solid function that sanitizes string values for form validation. The user notes on php.net offer the following: ...
0
by: Kamliesh Nadar | last post by:
Hi I am developing a software using VB.NET I am facing following problems - 1. Though I have placed the NotifyIcon control on the window service application, after starting the service I am...
15
by: Alfonso Morra | last post by:
Hi, I have some code from an example, that I want to retrofit into my project. The code from the example has the following line: SharedAppenderPtr myAppender( new...
0
by: Amit | last post by:
hi friends , I am stuck with a problem and need ur help. I have knowledge management application where i am using third party forums that needs login.I have username and password for forums...
2
by: walterd | last post by:
Hi Can anyone help me with the following problem. In my web application, I have a class that use the MessageBox class to display messages. My only problem is, messages pop-up on the server...
3
by: gauravkg via DotNetMonster.com | last post by:
Hi i have a problem I have a product product_name=taj Mahal product_id=111 i and different users will be putting reviews title and review description. this is the following xml file i...
0
by: prad | last post by:
Hi, Following java code returns 24 result sets.It counts number of rows in the first result set correctly.But doesnt count rows from next result set. When I debugged the code I found out that...
1
by: Pumpkin Carver | last post by:
I have a form that has a listview on it and a serious of strings in the listiew. When i doubel click on the listview item it opens a new form and displays the text that i pass to the constructor....
10
by: Silvana | last post by:
Hi, I'm new to Access or as a matter of fact it's the first time that I'm working with a database. I'm working on a program in Access for a class project and I'm having some trouble with the login...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.