Hey guys,
Im trying to figure out how to control the program flow using a getbyid() call. I need to control the programs flow so that if the object exists i can put the data to some web controls, if it does not exist then i need the program to continue as normal. I would like to do this without a try and catch clause in my code.
This doesnt work but it might give you an idea of what i mean:
Code:
IProfileDao pdao = DaoFactory.GetProfileDao();
if (pdao.GetProfileByOnePassId(Int32.Parse(returnvalue)) != null)
{
// fill out page controls
}
else
{
//dont do anything
}
Anyone any ideas?
Thanks
Dave