I've doubt about login page coding [Resolved]

Posted by Sudheep.grandhe under C# on 10/17/2011 | Points: 10 | Views : 1078 | Status : [Member] | Replies : 8
Hi,

I've doubt about login page coding..it will shows the error.i am underlined the error please find that.please do the needful
public class DALClass
{
DBConnection dbcon=new DBConnection ();
BEClass being=new BEClass ();
public DataTable loginpage(string uname,string upassword)
{
SqlConnection con=dbcon.conopen ();


Error 1 Cannot convert method group 'conopen' to non-delegate type 'System.Data.SqlClient.SqlConnection'. Did you intend to invoke the method?

Best,
Sudheep.



Responses

Posted by: Vuyiswamb on: 10/17/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 50

Up
0
Down

Resolved
Instead of this

SqlConnection con=dbcon.conopen ();


are you trying to do this ?

SqlConnection con=dbcon.Open (); 


Thank you for posting at Dotnetfunda
[Administrator]

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 10/17/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

if i tried like sqlconnection con=dbcon.open(); . in intelleseus it wont come . it will come like dbcon.opencon().if i place this connection.it shows the following error.null referenceexception was handled in below connection string
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["marsweb.imageimpacts"].ConnectionString);


Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 10/17/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
i really dont understand your problem , can you please install Teamviewer and demostrate your Problem. vuyiswamb [at] gmail.com(Gtalk)

Thank you for posting at Dotnetfunda
[Administrator]

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 10/17/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

I am not having the facility to install teamviewer rightnow.i am sending the gtalk request to you.you can accept my request.



Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: SheoNarayan on: 10/17/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Do you have the connectionStrings setting in your web.config file ("marsweb.imageimpacts"), looks like this is the culprit.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 10/17/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

I am using windows applications.i didn't create the app.config file

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jiji on: 10/17/2011 [Member] Starter | Points: 25

Up
0
Down
Hi

U just create one App.Config File.And Set Connection String to Config Section.Just try following Code

string connectionstring=System.Configuration.ConfigurationManager.ConnectionStrings["marsweb.imageimpacts"].ToString();
SqlConnection con = new SqlConnection(connectionstring);
con.open();


jiji




Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mittaikariss on: 10/18/2011 [Member] Bronze | Points: 25

Up
0
Down
http://www.dotnetfunda.com/codes/code1748-call-connectionstring-from-appweb-configuration-file.aspx

go and check out.........

http://www.invomtech.com/

....sundarsowmia....

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response