Compilation Error Not Understood
Hi everyone,
I get the following compiling error:
System.ArgumentException was unhandled
Message="Format of the initialization string does not conform to specification starting at index 0."
It points at the following line in the code:
System.Data.SqlClient.SqlConnection sqlConnection1 = new System.Data.SqlClient.SqlConnection("ServiceManagerDBConnectionString");
As you might have already guessed I am trying to open a new connection string for this method which should insert records into a database.
Q1 - Can anyone explain this compilation error?
Q2 - In the app.config, the name of the connection string is in multiparts seperated by periods. I only typed the last part, which I know is the actual name of the connection string. Was I wrong not to include the other parameters?
<connectionStrings>
<add name="CarServiceManager.Properties.Settings.ServiceManagerDBConnectionString"
connectionString="Data Source=|DataDirectory|\database\ServiceManagerDB.sdf"
providerName="Microsoft.SqlServerCe.Client.3.5" />
</connectionStrings>
I hope my question is not too confusing, as I am new to programming.
I thank you all for your help in advance
Answers (8)
2
To resolve your issue:
1. Make method as public and static
2. Make sure param name should be same
3. Make sure that you shouldn't have any client side error like variable is undefined etc.. You can see error in console tab by pressing F12 in browser.
4. jQuery library reference should be added properly.
- [System.Web.Services.WebMethod]
- public static string saveTask(string date, string id)
- {
- return "Hello " + name + Environment.NewLine + "The Current Time is: "
- + DateTime.Now.ToString();
- }
Accepted 0
Thanx guys....I found the soultion. I changed in the RouteConfug :settings.AutoRedirectMode = RedirectMode.Off; instead of settings.AutoRedirectMode = RedirectMode.Permanent
0
It is May be possible in Server side Error Occured..
that time debugger is not properly working on..