how to solve this using flag

Posted by Oswaldlily under ASP.NET on 10/19/2012 | Points: 10 | Views : 586 | Status : [Member] | Replies : 2
I have 3 class.each class contains with different conditions.
class1
{
if(txtbox.text=="")
{
//error
}
}
class2
{
if(txtbox2.text=="a")
{
//error
}}
class3
{
if(txtbox3.text=="int")
{
//error
}}

i m callin these 3 class using reflection.
if one class encounter a error it should not
move to next classes.
But since i used reflection automatically
all 3 classes are visited..hw to solve this




Responses

Posted by: CGN007 on: 10/19/2012 [Member] Silver | Points: 25

Up
0
Down
Please use try catch ..
try

{
//code here
}
catch (Exception e)
{
// Exception caught
}


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

Posted by: Jayakumars on: 10/21/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi
Oswaldlily

Can you post your code here.

Mark as Answer if its helpful to you

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

Login to post response