Cannot implicitly convert type ‘int’ to ‘string’
Simple type casting problem, actually the value is INT datatype and trying to assign a variable with datatype string. Thats why we must convert variables to respective datatype properly before assigning to any other variable.
Server Error in ‘/dcorp’ Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0029: Cannot implicitly convert type ‘int’ to ‘string’
Source Error:
Line 26: string userid = loginname.Text.ToString();
Line 27: string pwd = password.Text.ToString();
Line 28: string userInfo = userObj.login(userid, pwd); Line 29: switch (userInfo)
Line 30: {
|
Source File: d:\developers\Suraj\projects\dunecorporation\Default.aspx.cs Line: 28
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
The name ‘SqlHelper’ does not exist in the current context Compiler Error Message: CS0161: ‘users.login(string, string)’: not all code paths return a value