Click here to Skip to main content
13,598,183 members
Rate this:
Please Sign up or sign in to vote.
See more:
there is no row at position 0
How to Reslove Code---

<pre lang="C#">if (Session[&quot;remark&quot;].ToString() == &quot;0&quot;)
Session[&quot;remark&quot;] = &quot;1&quot;;
try {
catch(Exception Ex)


What I have tried:

i want to resolve exception i have mention code so please help me
Posted 14-Feb-16 23:33pm
Jochen Arndt 15-Feb-16 5:42am
Which function call throws the exception?

To avoid it, check the condition before calling the function. Alternatively handle it inside the catch statement.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You cannot 'resolve' the exception: you catch it and handle, in the catch block, the error.
If there is 'no row at position 0' then you probably have a failed query. Depending on your scenario you could inform the user of the failure, or terminate the application or attack the pirates or whatever...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web04-2016 | 2.8.180621.3 | Last Updated 15 Feb 2016
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100