ASP .NET 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.
Exception Details: System.FormatException: 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.
This error happens when u give a string for an index value
This is where error happened in my code
Doc.DocumentNode.SelectNodes("//meta")("Keywords").Attributes("content").Value = txtMetaKeyword.Text
This is how I corrected it
Doc.DocumentNode.SelectNodes("//meta")(0).Attributes("content").Value = txtMetaKeyword.Text
The error was index doesnot accept string "Keywords" you have to give a numeric value 0
|