@xylenedz One of the possible reason is that your command’s query may have returned no value….make sure you’ve typed your query right in string format with proper punctuations.
hye! 1st of all, tnx for this awesome tutorial! ![]()
btw, i’ve got some error on codebehind login part.
*Object reference not set to an instance of an object.*
And it highlighted this part :
string password = Password.ExecuteScalar().ToString();
Could you please help me fix this error cause i don’t know how to fix it. Already search on google but still can’t find the answer.
Thanks in advance..
@Shmv90 Sure…
I wrote the code for the login page exactly similar to what you have done in you demo. similarly the login website part 1, 2 and 3.
After i have finished with part 5 and made login page as a start page. i clicked on debug botton so i have got an error in the login page code. The error message was ” Cannot implicitly convert type ‘string’ to ‘bool’ ”
when i clicked on the msg it highlighted this part of the code:
” string password = Pass.ExecuteScalar().ToString();”
@TeddyASH Sorry I can not understand your problem.!! Would you please elaborate it???
Hi shamv,
I’m facing an error
Cannot implicitly convert type ‘string’ to ‘bool’
this error concerning line: password = TBPassword.Text
which is related to line: string password = Pass.ExecuteScalar().ToString();
what do you thin the problem could be
Thank you
Hi shamv,
I’m facing an error
Cannot implicitly convert type ‘string’ to ‘bool’
this error concerning line: password = TBPassword.Text
which is related to line: string password = Pass.ExecuteScalar().ToString();
what do you thin the problem could be
@DoctorM64 It’s a good practice that you add con.close() in finally portion of try catch block. I’m sorry I must have forgotten that to add in this video.
Hi! Very useful video, congratulations!
I noticed you didn´t close the SQL connection in this video, if you were to add con.Close(), where would you add it?
Is it really necesary at all?
Thanks!!
Hey
I am getting an error at line
string Password = pass.ExecuteScalar().ToString();
error:Object reference not set to an instance of object…
please help!!
Everything works fine to me. People who want to see it better must use browser full screen.
int temp = Convert.ToInt32(checkuser.ExecuteScalar().ToString());
this is right?
@prakash4everything: I think you should use javascript’s _doPostBack function in your code. Search for it in google for how to use it in detail.
Hi i needed help in asp.net 4 application . i have a form without runat having input tags for login in header right top And another form in section having accordian of ajax control toolkit so has runat=server. Now how do i know user request login i.e., how to find login_form’s login button has been clicked in server-code so that i can call my logintosystem() function performing database work. waiting as time is less for work completion
You must be logged in to post a comment.
Comments
Leave a comment Trackback