Click here to Skip to main content
15,898,588 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Sintax problem Pin
Christian Graus15-Nov-09 19:38
protectorChristian Graus15-Nov-09 19:38 
Questionbinding an arraylist to datalist and implement pagination in Presentation Layer [modified] Pin
uglyeyes15-Nov-09 12:16
uglyeyes15-Nov-09 12:16 
AnswerRe: binding an arraylist to datalist and implement pagination in Presentation Layer Pin
Abhishek Sur15-Nov-09 12:29
professionalAbhishek Sur15-Nov-09 12:29 
GeneralRe: binding an arraylist to datalist and implement pagination in Presentation Layer Pin
uglyeyes15-Nov-09 13:15
uglyeyes15-Nov-09 13:15 
GeneralRe: binding an arraylist to datalist and implement pagination in Presentation Layer Pin
Abhishek Sur15-Nov-09 21:15
professionalAbhishek Sur15-Nov-09 21:15 
AnswerRe: binding an arraylist to datalist and implement pagination in Presentation Layer Pin
Not Active15-Nov-09 12:32
mentorNot Active15-Nov-09 12:32 
QuestionLogin problem with ExecuteScalar(); Pin
Maxdd 715-Nov-09 11:09
Maxdd 715-Nov-09 11:09 
AnswerRe: Login problem with ExecuteScalar(); Pin
Abhishek Sur15-Nov-09 11:31
professionalAbhishek Sur15-Nov-09 11:31 
To make you understand, I guess ExecuteScalar executes a query and returns only the first column of the first row. All others are just ignored. So why do you select them ??

Anyways, ExecuteScalar returns an object. So you might use

string existe = com.ExecuteScalar().ToString();

But let me remind you, if there is no row selected, this line will through an error. So rather check the object first.

object result = com.ExecuteScalar();
if(result != null)
 string existe = result.ToString();


Hope this is fine. Or you can also check Count(*) to determine if anyone is selected or not in the query.

Thumbs Up | :thumbsup:

Abhishek Sur
Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->

Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript

GeneralRe: Login problem with ExecuteScalar(); Pin
Not Active15-Nov-09 12:01
mentorNot Active15-Nov-09 12:01 
GeneralRe: Login problem with ExecuteScalar(); Pin
Abhishek Sur15-Nov-09 12:05
professionalAbhishek Sur15-Nov-09 12:05 
GeneralRe: Login problem with ExecuteScalar(); Pin
Not Active15-Nov-09 12:30
mentorNot Active15-Nov-09 12:30 
GeneralRe: Login problem with ExecuteScalar(); Pin
Maxdd 715-Nov-09 12:21
Maxdd 715-Nov-09 12:21 
GeneralRe: Login problem with ExecuteScalar(); Pin
Abhishek Sur15-Nov-09 12:24
professionalAbhishek Sur15-Nov-09 12:24 
GeneralRe: Login problem with ExecuteScalar(); Pin
Not Active15-Nov-09 12:26
mentorNot Active15-Nov-09 12:26 
GeneralRe: Login problem with ExecuteScalar(); Pin
Maxdd 715-Nov-09 12:33
Maxdd 715-Nov-09 12:33 
AnswerRe: Login problem with ExecuteScalar(); Pin
Not Active15-Nov-09 12:04
mentorNot Active15-Nov-09 12:04 
GeneralRe: Login problem with ExecuteScalar(); Pin
Abhishek Sur15-Nov-09 12:08
professionalAbhishek Sur15-Nov-09 12:08 
AnswerRe: Login problem with ExecuteScalar(); Pin
Christian Graus15-Nov-09 17:28
protectorChristian Graus15-Nov-09 17:28 
QuestionAccesing control value in GridView on postback Pin
Aftab Sindhi15-Nov-09 5:07
Aftab Sindhi15-Nov-09 5:07 
AnswerRe: Accesing control value in GridView on postback Pin
Suresh Pirsquare15-Nov-09 7:04
Suresh Pirsquare15-Nov-09 7:04 
Questionhttp request and web request Pin
noo.dyab15-Nov-09 5:07
noo.dyab15-Nov-09 5:07 
AnswerRe: http request and web request Pin
Abhishek Sur15-Nov-09 6:16
professionalAbhishek Sur15-Nov-09 6:16 
Questioncan we store viewstate in masterpage? Pin
Suresh Pirsquare14-Nov-09 19:31
Suresh Pirsquare14-Nov-09 19:31 
AnswerRe: can we store viewstate in masterpage? Pin
Abhijit Jana14-Nov-09 19:55
professionalAbhijit Jana14-Nov-09 19:55 
GeneralRe: can we store viewstate in masterpage? Pin
Suresh Pirsquare14-Nov-09 20:16
Suresh Pirsquare14-Nov-09 20:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.