Hi
i'm opening a modal dialog box prompting user for a custom login for access to a web service.
this works fine, but the code itself is pretty ugly, so i wondered if anyone could tell me the right way to handle return values from modal dialogs in managed code?
thanx
//AndersR
Object login = e.XDocument.UI.ShowModalDialog("loginModal.htm", e.XDocument, 305, 328, null, null);
if ( login == null || login.ToString() == "" || login.ToString().Split('¤').Length < 3 )
{
e.XDocument.UI.Alert("Missing credentials in login");
e.ReturnStatus = false;
return;
}
else
{
String[] loginArray = login.ToString().Split('¤');
SetLoginCredentials(loginArray[0],loginArray[1],loginArray[2]);
}