473,542 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

input string was not in a correct format

4 New Member
Hello folks

I have recently been studying a book called "sams teach yourself asp.net 2.0 in24 hours by scott mitchell. I have reached page 614 but when i tried to run an asp page called Photoadmin/default.aspx i got the following message and info.


Input string was not in a correct format.

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

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FormatException : Input string was not in a correct format.]
System.Number.S tringToNumber(S tring str, NumberStyles options, NumberBuffer& number, NumberFormatInf o info, Boolean parseDecimal) +2752899
System.Number.P arseInt32(Strin g s, NumberStyles style, NumberFormatInf o info) +102
System.String.S ystem.IConverti ble.ToInt32(IFo rmatProvider provider) +43
System.Convert. ChangeType(Obje ct value, TypeCode typeCode, IFormatProvider provider) +293
System.Web.UI.W ebControls.Para meter.GetValue( Object value, String defaultValue, TypeCode type, Boolean convertEmptyStr ingToNull, Boolean ignoreNullableT ypeChanges) +248
System.Web.UI.W ebControls.SqlD ataSourceView.A ddParameters(Db Command command, ParameterCollec tion reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParame terFormatString ) +547
System.Web.UI.W ebControls.SqlD ataSourceView.E xecuteInsert(ID ictionary values) +304
System.Web.UI.D ataSourceView.I nsert(IDictiona ry values, DataSourceViewO perationCallbac k callback) +68
System.Web.UI.W ebControls.Deta ilsView.HandleI nsert(String commandArg, Boolean causesValidatio n) +394
System.Web.UI.W ebControls.Deta ilsView.HandleE vent(EventArgs e, Boolean causesValidatio n, String validationGroup ) +609
System.Web.UI.W ebControls.Deta ilsView.OnBubbl eEvent(Object source, EventArgs e) +88
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +35
System.Web.UI.W ebControls.Deta ilsViewRow.OnBu bbleEvent(Objec t source, EventArgs e) +109
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +35
System.Web.UI.W ebControls.Link Button.OnComman d(CommandEventA rgs e) +85
System.Web.UI.W ebControls.Link Button.RaisePos tBackEvent(Stri ng eventArgument) +153
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +170
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +4921

I have also included the event handlers for the above problem:


Version Information: Microsoft .NET Framework Version:2.0.507 27.42; ASP.NET Version:2.0.507 27.42

Partial Class PhotoAdmin_Defa ult
Inherits System.Web.UI.P age

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s) Handles Me.Load
UserIdValue.Tex t = Membership.GetU ser().ProviderU serKey.ToString ()


End Sub

Protected Sub dvPictureInsert _ItemInserting( ByVal sender As Object, ByVal e As System.Web.UI.W ebControls.Deta ilsViewInsertEv entArgs) Handles dvPictureInsert .ItemInserting
e.Values("UserI d") = Membership.GetU ser().ProviderU serKey
e.Values("Uploa dedOn") = DateTime.Now

End Sub

End Class

thanx for your help
john
Mar 24 '07 #1
1 4509
jhardman
3,406 Recognized Expert Specialist
Hello folks

I have recently been studying a book called "sams teach yourself asp.net 2.0 in24 hours by scott mitchell. I have reached page 614 but when i tried to run an asp page called Photoadmin/default.aspx i got the following message and info.


Input string was not in a correct format.
What enctype was specified in your form?

Jared
Mar 27 '07 #2

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

Similar topics

2
21074
by: Jim | last post by:
im using asp.net, C# to enter data into a table in sql server...however im getting this error: Input string was not in a correct format. 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. ...
0
768
by: lianfe_ravago | last post by:
Input string was not in a correct format. 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: ...
5
2503
by: blackg | last post by:
Input string not in correct format -------------------------------------------------------------------------------- I am trying to view a picture from a table. I am getting this error Input string not in the correct format. Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the...
1
1835
by: amitbadgi | last post by:
Welcome back amitbadgi | Logout | Faq Knowledge Discovery Keys COMPUTER PROGRAMMING, DATA MINING, STATISTICS, ARTIFICIAL INTELLIGENCE * Settings * Photos * Lists * MVPs * Forums * Blogs
1
2840
by: amitbadgi | last post by:
I am gettign this error, while migration an app to asp.net Exception Details: System.FormatException: Input string was not in a correct format. Source Error: Line 19: Dim enddate = request.QueryString("enddate") Line 20: Line 21: if cint(eventid) = "0" then
0
2533
by: hudhuhandhu | last post by:
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...
0
11952
by: Anonieko | last post by:
Are there any javascript codes there? Answer: Yes On the PageLoad event call InitialClientControsl as follows /// <summary> /// This will add client-side event handlers for most of the form controls so
0
3157
by: sehguh | last post by:
Hiya Folks, I am Currently using windows xp. Also using Visual Web Developer 2005 and Microsoft Sql server 2005. The main page consists of an aspx page and a master page. The page also consists of a label control(hidden when run in browser). Also an Sql data source control connected to database tables for a photo album. Also label web...
1
4737
by: differentsri | last post by:
THIS IS AN ASP.NET 1.1 APPLICATION IAM TRYING TO UPDATE THE FIELD BUT I AM NOT ABLE TO UPDATE IT? CAN U TELL THE REASON ? IT IS GIVING THE FOLLOWING ERROR BELOW I HAVE ALSO GIVEN THE CODE OF THE PROGRAM PLEASE HELP ME Server Error in '/WebApplication1' Application....
0
7397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7582
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5877
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5257
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3384
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1809
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
948
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.